/* ============================================================
   ShopCYPT Frontend — Shared Component Styles
   Ported from PHP: auth-modal.php, cart-view.php, CartWidgetV5.php
   ============================================================ */

/* ─── AUTH MODAL ────────────────────────────────────────────── */
/* From: DTFphase1/components/auth-modal.php lines 101-248 */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.auth-modal.auth-modal-open {
    background: rgba(0, 0, 0, 0.6);
}

.auth-modal-content {
    background: #fff;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    max-width: 480px;
    width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    font-family: 'Inter', sans-serif;
}

.auth-modal-open .auth-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
    transition: color 0.2s;
    background: none;
    border: none;
    font-family: inherit;
}

.auth-modal-close:hover {
    color: #000;
}

/* Tabs */
.auth-tabs {
    display: flex;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    gap: 0;
}

.auth-tab {
    flex: 1;
    padding: 0.75rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #9ca3af;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.auth-tab:hover {
    color: #374151;
}

.auth-tab.active {
    color: #000;
    border-bottom-color: #000;
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: #000;
}

.auth-form .form-row {
    display: flex;
    gap: 1rem;
}

.auth-form .form-row .form-group {
    flex: 1;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: #374151;
}

.auth-form .form-group input[type="email"],
.auth-form .form-group input[type="password"],
.auth-form .form-group input[type="text"],
.auth-form .form-group input[type="tel"] {
    width: 100%;
    padding: 0.7rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #1e293b;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.auth-form .form-group small {
    color: #6b7280;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.25rem;
}

/* Checkbox */
.auth-form .form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 400;
}

.auth-form .form-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #000;
}

/* Submit button */
.auth-form .btn-auth-submit {
    width: 100%;
    padding: 0.8rem;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, transform 0.15s;
}

.auth-form .btn-auth-submit:hover {
    background: #1a1a1a;
    transform: translateY(-1px);
}

.auth-form .btn-auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Links */
.auth-links {
    text-align: center;
    margin-top: 1rem;
}

.auth-links a {
    color: #000;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.auth-links a:hover {
    border-color: #000;
}

/* Message */
.auth-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Switch prompt */
.auth-switch {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.auth-switch a {
    color: #000;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 600px) {
    .auth-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .auth-modal-content {
        padding: 1.25rem;
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
    }
}

/* ─── CART BADGE ENHANCEMENTS ─────────────────────────────── */
/* From: DTFphase1/components/CartWidgetV5.php lines 534-559 */
.nav-v20-cart-count {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.nav-v20-cart-count.bump {
    animation: cartBadgePulse 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.nav-v20-cart-count.is-empty {
    opacity: 0;
    transform: scale(0);
}

@keyframes cartBadgePulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.35);
    }

    100% {
        transform: scale(1);
    }
}

/* ─── GLOBAL ANIMATIONS ───────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ─── LOADING SPINNER ─────────────────────────────────────── */
.sc-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: #9ca3af;
    font-family: 'Inter', sans-serif;
    gap: 10px;
}

.sc-loading .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #e5e7eb;
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── EMPTY STATE ─────────────────────────────────────────── */
.sc-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
    font-family: 'Inter', sans-serif;
}

.sc-empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.5;
}

.sc-empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.sc-empty-state p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.sc-empty-state .btn-swiss {
    display: inline-flex;
}