/**
 * Modern & User-Centric Styles for WooCommerce Account Off-Canvas
 *
 * Filename: account-dropdown.css
 * Description: This stylesheet styles the account panel as an off-canvas
 *              that slides in from the left.
 */

/* ==========================================================================
   1. Body State & Overlay
   ========================================================================== */

/* Prevents scrolling on the body when the off-canvas is open. */
body.account-offcanvas-open {
    overflow: hidden;
}

/* Full-screen overlay to dim the background content. */
.account-offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.account-offcanvas-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   2. Off-Canvas Container (#account-dropdown)
   ========================================================================== */

/* The main off-canvas container itself.
   It is fixed to the viewport and slides in from the left.
   Visibility is controlled with the 'is-open' class via JavaScript. */
#account-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 400px;
    padding-right: 5px;
    padding-left: 10px;
    height: 100%;
    background-color: #ffffff;
    z-index: 1050;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
}

#account-dropdown.is-open {
    transform: translateX(0);
}

/* The inner container for the login and account content.
   This enables vertical scrolling if the content overflows. */
.account-dropdown-login {
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
}

/* ==========================================================================
   3. Close Button
   ========================================================================== */
.account-offcanvas-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    color: #6B7280;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.account-offcanvas-close:hover {
    color: #111827;
    transform: rotate(90deg);
}


/* ==========================================================================
   4. Typography and General Elements
   ========================================================================== */

.account-dropdown-login h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 8px;
    color: #111827;
}

.account-dropdown-login p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #6B7280;
    margin-bottom: 24px;
}

/* ==========================================================================
   5. Form Structure & Fields
   ========================================================================== */

.woocommerce-form-login {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.woocommerce-form-login .form-row {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.woocommerce-form-login .clear {
    display: none;
}

.woocommerce-form-login label {
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 14px;
    color: #374151;
}

.woocommerce-form-login .input-text {
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 14px;
    font-size: 16px;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce-form-login .input-text:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

/* ==========================================================================
   6. Primary & Secondary Actions
   ========================================================================== */

.woocommerce-form-login__submit {
    background-color: #1D4ED8;
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    -webkit-appearance: none;
}

.woocommerce-form-login__submit:hover {
    background-color: #1E40AF;
}

.woocommerce-form-login__submit:active {
    transform: scale(0.98);
}

.woocommerce-form-login__rememberme {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

.woocommerce-form-login__rememberme input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
}

.lost_password a,
.register-link a {
    color: #3B82F6;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.lost_password a:hover,
.register-link a:hover {
    color: #1D4ED8;
    text-decoration: underline;
}

.lost_password {
    text-align: center;
}

.register-link {
    text-align: center;
    border-top: 1px solid #E5E7EB;
    padding-top: 24px;
    margin-top: 12px;
}
/* ==========================================================================
   7. My Account Navigation
   ========================================================================== */
.account-dropdown-links {
    padding: 30px;
    flex-grow: 1;
    overflow-y: auto;
}
.account-dropdown-links h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 24px;
    color: #111827;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.woocommerce-MyAccount-navigation-link a {
    display: block;
    padding: 14px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    color: #374151;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.woocommerce-MyAccount-navigation-link a:hover {
    background-color: #F3F4F6;
    color: #111827;
}

.woocommerce-MyAccount-navigation-link.is-active > a {
    background-color: #3B82F6;
    color: #ffffff;
}

.woocommerce-MyAccount-navigation-link--customer-logout a {
    color: #EF4444;
}

.woocommerce-MyAccount-navigation-link--customer-logout a:hover {
    background-color: #FEF2F2;
    color: #DC2626;
}