/* QR Endpoint (Customer-facing) Page Styles */

.qr-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.qr-endpoint-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 0;
}

.qr-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.qr-header {
    background: linear-gradient(45deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.theme-selector {
    margin: 20px 0;
}

.theme-btn {
    margin: 5px;
    padding: 10px 15px;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    background: white;
    color: #495057;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.theme-btn:hover {
    border-color: #007bff;
    color: #007bff;
    text-decoration: none;
}

.theme-btn.active {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.product-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

#aiContent {
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#aiContent .typing-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #007bff, #28a745);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
    margin-left: 4px;
    vertical-align: middle;
}

.ai-content {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
    min-height: 150px;
    border-left: 4px solid #007bff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.typing-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #007bff, #28a745);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
    100% { opacity: 1; transform: scale(1); }
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.regenerate-btn {
    background: linear-gradient(45deg, #fd7e14 0%, #e63946 100%);
    border: none;
    border-radius: 20px;
    color: white;
    padding: 10px 20px;
    margin-top: 15px;
}

.regenerate-btn:hover {
    background: linear-gradient(45deg, #e8590c 0%, #d62828 100%);
    color: white;
}

.loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.generate-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border-radius: 25px;
    margin: 10px 0;
}

.location-toggle {
    margin: 20px 0;
    text-align: center;
}

.location-toggle .form-check {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.location-toggle .form-check::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.location-toggle .form-check:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,123,255,0.2);
}

.location-toggle .form-check:hover::before {
    left: 100%;
}

.location-toggle .form-check-input {
    margin: 0;
    transform: scale(1.3);
    accent-color: #007bff;
}

.location-toggle .form-check-label {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    color: #495057;
    position: relative;
    z-index: 1;
}

.location-status {
    margin-top: 10px !important;
    border-radius: 8px;
    animation: slideInFade 0.3s ease-out;
}

@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-tag {
    background: #e9ecef;
    color: #495057;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
    margin: 5px 0;
}

@media (max-width: 768px) {
    .qr-endpoint-container {
        padding: 5px;
    }

    .qr-container {
        padding: 0px;
    }

    .qr-card {
        margin: 5px;
        border-radius: 10px;
    }

    .qr-header {
        padding: 15px;
    }

    .product-info {
        padding: 15px;
        margin: 15px 0;
    }

    .ai-content {
        padding: 15px;
        margin: 15px 0;
    }

    .theme-selector {
        margin: 15px 0;
    }

    .theme-btn {
        font-size: 1rem;
        padding: 12px 16px;
        margin: 5px;
    }

    .product-info h2 {
        font-size: 1.5rem;
    }

    /* Enhanced mobile location toggle */
    .location-toggle {
        margin: 15px 0;
    }

    .location-toggle .form-check {
        padding: 15px 12px;
        margin: 15px 0;
        background: #f8f9fa;
        border: 2px solid #dee2e6;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        min-height: 55px;
    }

    .location-toggle .form-check:hover,
    .location-toggle .form-check:active {
        background: #e9ecef;
        border-color: #007bff;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .location-toggle .form-check-input {
        transform: scale(1.5);
        margin-right: 8px;
    }

    .location-toggle .form-check-label {
        font-size: 1rem;
        font-weight: 600;
        color: #495057;
        line-height: 1.3;
        padding: 3px;
    }

    .generate-btn {
        margin: 15px 0;
        padding: 12px;
        font-size: 1rem;
    }
}
