/* ============================================
   AVOSEC THEME TOGGLE - Button & Overrides
   Loaded on all frontend pages
   ============================================ */

/* ============================================
   THEME TOGGLE BUTTON (Fixed position)
   ============================================ */
#theme-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e293b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

#theme-toggle-btn:hover {
    transform: scale(1.1);
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

#theme-toggle-btn .theme-icon {
    font-size: 22px;
    line-height: 1;
}

html[data-theme="light"] #theme-toggle-btn {
    background-color: #ffffff;
    border-color: rgba(203, 213, 225, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] #theme-toggle-btn:hover {
    border-color: #10b981;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

/* ============================================
   NAVIGATION HOVER - Consistent for both themes
   Remove arrow, use text color change only
   ============================================ */

/* Remove the arrow pseudo-element on hover */
nav.woocommerce-MyAccount-navigation ul li:not(.is-active):hover:after {
    display: none !important;
    content: none !important;
}

/* ============================================
   LEGACY COMPATIBILITY OVERRIDES
   These ensure old styles don't conflict
   ============================================ */

/* Ensure modal text is readable */
html body .modal {
    color: var(--color-text-primary, #1a1a2e);
}

/* Select2 dropdown text color fix */
html body .select2-dropdown {
    color: var(--color-text-primary);
}

/* WooCommerce info links in notices */
html body .woocommerce-info a {
    color: inherit !important;
}

/* Cart table input width */
html body #cart_table_body .avosec_update_seats {
    width: 80px;
    text-align: center;
}

/* Datepicker width in wallet — primary rule in avosec-design-system.css */

/* Payment method label */
html body .payment_method_sagepayform label {
    line-height: 2rem;
}

/* Hide broken icon */
html body a > span.dashicons.dashicons-editor-break {
    display: none;
}

/* ============================================
   QUOTE/REMOVE BUTTON STYLING
   ============================================ */
html body .spr_quote_tym {
    font-size: var(--text-base, 16px);
    color: var(--color-success, #10b981);
    margin-top: var(--space-5, 1.25rem);
}

html body .gaq_remove,
html body .lo_remove,
html body .sod_remove {
    margin-left: auto;
    font-size: var(--text-xl, 1.25rem);
    cursor: pointer;
    color: var(--color-danger, #ef4444);
    transition: transform 0.2s ease;
}

html body .gaq_remove:hover,
html body .lo_remove:hover,
html body .sod_remove:hover {
    transform: scale(1.1);
}

/* ============================================
   SAGEPAY CARD ICONS
   ============================================ */
html body #sagepaydirect-card-icons {
    margin-left: auto;
}

/* ============================================
   WP 2FA FORCED SETUP NAG (grace-period notice)
   ============================================
   Targets the .wp-2fa-nag div rendered by WP 2FA's Authenticator\Login class
   during the 2FA enforcement grace period (see wp-2fa/includes/classes/
   Authenticator/class-login.php ~line 331, 344–348). Fixes both the
   low-contrast message text and the stacked / unaligned button layout.

   HTML structure:
     <div class="wp-2fa-nag">
       <p>[message]</p>
       <div>
         <a class="button button-primary">Configure 2FA now</a>
         <a class="button button-secondary dismiss-user-configure-nag">I'll do it later</a>
       </div>
     </div>
*/
html body .wp-2fa-nag {
    background: #1f2937;
    color: #f3f4f6;
    padding: 28px 32px;
    border-radius: 12px;
    max-width: 560px;
    margin: 48px auto;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.55;
    font-size: 15px;
}

html body .wp-2fa-nag p {
    color: #f3f4f6;
    margin: 0 0 14px;
}

html body .wp-2fa-nag p strong {
    color: #ffffff;
}

html body .wp-2fa-nag > div {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
}

html body .wp-2fa-nag .button.button-primary {
    background-color: #10b981;
    border: 1px solid #10b981;
    color: #ffffff;
    padding: 11px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
    transition: background-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

html body .wp-2fa-nag .button.button-primary:hover,
html body .wp-2fa-nag .button.button-primary:focus {
    background-color: #059669;
    border-color: #059669;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.45);
    color: #ffffff;
}

html body .wp-2fa-nag .button.button-secondary {
    background-color: transparent;
    border: 1px solid rgba(243, 244, 246, 0.45);
    color: #f3f4f6;
    padding: 11px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

html body .wp-2fa-nag .button.button-secondary:hover,
html body .wp-2fa-nag .button.button-secondary:focus {
    background-color: rgba(243, 244, 246, 0.08);
    border-color: rgba(243, 244, 246, 0.65);
    color: #ffffff;
}

/* Light theme override — readable on light backgrounds */
html[data-theme="light"] body .wp-2fa-nag {
    background: #ffffff;
    color: #1f2937;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] body .wp-2fa-nag p,
html[data-theme="light"] body .wp-2fa-nag p strong {
    color: #1f2937;
}

html[data-theme="light"] body .wp-2fa-nag .button.button-secondary {
    color: #374151;
    border-color: rgba(31, 41, 55, 0.3);
}

html[data-theme="light"] body .wp-2fa-nag .button.button-secondary:hover,
html[data-theme="light"] body .wp-2fa-nag .button.button-secondary:focus {
    background-color: rgba(31, 41, 55, 0.05);
    border-color: rgba(31, 41, 55, 0.55);
    color: #111827;
}
