/* ============================================
   Account Icon Styles
   ============================================ */

.item-account,
.item-account-desktop {
    display: flex;
    align-items: center;
    margin-right: 8px;
}

.account-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #f8f9fa;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    position: relative;
    text-decoration: none;
}

.account-icon-link:hover {
    background: #DC4D28 !important;
    text-decoration: none !important;
}

.account-icon {
    stroke: #333;
    transition: stroke 0.3s ease;
}

.account-icon-link:hover .account-icon {
    stroke: white !important;
}

/* Hide desktop account icon on mobile */
.item-account-desktop {
    display: none;
}

@media (min-width: 992px) {
    .item-account {
        display: none;
    }

    .item-account-desktop {
        display: flex;
    }
}

/* ============================================
   Account Modal Overlay & Container
   ============================================ */

.account-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.account-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.account-modal {
    display: none;
    width: 100%;
    max-width: 480px;
    margin: 20px;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.account-modal.active {
    display: block;
    transform: scale(1) translateY(0);
    opacity: 1;
}

.account-modal__content {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.account-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
}

.account-modal__close:hover {
    color: #DC4D28;
    background: rgba(220, 77, 40, 0.1);
    transform: rotate(90deg);
}

.account-modal__title {
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
    text-align: center;
}

.account-modal__description {
    color: #6b7280;
    font-size: 14px;
    text-align: center;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

/* ============================================
   Account Form Styles
   ============================================ */

.account-form {
    margin-top: 30px;
}

.account-form__group {
    margin-bottom: 24px;
}

.account-form__group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.account-form__group input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #fff;
    font-family: inherit;
}

.account-form__group input:focus {
    outline: none;
    border-color: #DC4D28;
    box-shadow: 0 0 0 3px rgba(220, 77, 40, 0.1);
}

.account-form__group input::placeholder {
    color: #9ca3af;
}

.account-form__remember {
    margin-bottom: 24px;
}

.account-form__remember label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.account-form__remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #DC4D28;
}

.account-form__submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #DC4D28 0%, #b83d1f 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 77, 40, 0.3);
}

.account-form__submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 77, 40, 0.4);
}

.account-form__submit:active {
    transform: translateY(0);
}

.account-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.account-form__links {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-link {
    color: #DC4D28;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.account-link:hover {
    color: #b83d1f;
    text-decoration: underline;
}

/* Loading State */
.account-form.loading .account-form__submit {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.account-form.loading .account-form__submit::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Message */
.account-form__error {
    padding: 12px 16px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #991b1b;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.account-form__error.active {
    display: block;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Success Message */
.account-form__success {
    padding: 12px 16px;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    color: #065f46;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
}

.account-form__success.active {
    display: block;
    animation: slideDown 0.4s ease;
}

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

/* Responsive */
@media (max-width: 576px) {
    .account-modal {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    .account-modal__content {
        padding: 30px 24px;
    }

    .account-modal__title {
        font-size: 24px;
    }
}
