/* ================================================
   HENDOSHI - PROFILE ACCOUNT
   ================================================

   Purpose: User-facing account and authentication page styling, covering
            the profile dashboard, notifications, auth flows, and cart/checkout
            overrides specific to authenticated user views.

   Contains:
   - Profile page layout and stat cards (orders, wishlist counts)
   - Notification preferences page
   - Unsubscribe and unsubscribe confirmation pages
   - Email verification sent page
   - Account activation / auth page (auth-icon, auth-card)
   - Shipping and returns page content
   - Payment section and progress bar
   - Cart item grid (modern cart overrides)
   - Order totals and total-row
   - Form actions (checkout / payment buttons)
   - Light mode overrides

   Dependencies: variables.css, ui-components.css
   Load Order: Load after foundation and components
   ================================================ */

.profile-page {
    min-height: 100vh;
    padding-top: 112px;
}

/* Profile Stats Cards */
.profile-stat-card {
    padding: 1.5rem 1rem;
    border: 2px solid rgba(255, 20, 147, 0.2) !important;
    transition: all 0.3s ease;
}

.profile-stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-pink);
    box-shadow: 0 10px 30px rgba(255, 20, 147, 0.3);
}

.profile-stat-icon {
    margin-bottom: 0.75rem;
    color: var(--neon-pink);
    font-size: 2rem;
}

.profile-stat-value {
    margin-bottom: 0.25rem;
    color: var(--off-white);
    font-weight: 700;
    font-size: 1.75rem;
}

.profile-stat-label {
    color: var(--gray);
    font-size: 0.875rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .profile-page {
        padding-top: 100px;
    }

    .profile-stat-card {
        margin-bottom: 0.75rem;
        padding: 1rem 0.75rem;
    }

    .profile-stat-icon {
        margin-bottom: 0.5rem;
        font-size: 1.5rem;
    }

    .profile-stat-value {
        margin-bottom: 0.35rem;
        font-size: 1.5rem;
    }

    .profile-stat-label {
        font-size: 0.75rem;
    }
}

/* On profile pages we use Bootstrap's row/col grid. Prevent the
   checkout-specific two-column CSS grid from constraining the
   layout inside profile pages. */
.profile-page .checkout-main {
    display: block;
}

/* From: templates/notifications/unsubscribe.html */
.unsub-container {
    margin-top: 120px;
    margin-bottom: 60px;
}

.unsub-icon-pink,
.unsub-title-pink {
    color: var(--neon-pink);
}

.unsub-divider {
    margin: 16px 0;
    border-color: var(--border-glass-color);
}

.unsub-footer {
    border-top: 1px solid var(--border-glass-color);
}

.btn-outline-pink {
    border-color: var(--neon-pink);
    background: transparent;
    color: var(--neon-pink);
}

.btn-outline-pink:hover {
    background: var(--neon-pink);
    color: white;
}

/* From: templates/notifications/unsubscribe_confirm.html */
.unsub-confirm-container {
    margin-top: 120px;
    margin-bottom: 60px;
}

.unsub-success-icon,
.unsub-success-title {
    color: #28a745;
}

.unsub-error-icon,
.unsub-error-title {
    color: #dc3545;
}

.unsub-info-alert {
    border-color: #ff1493;
    background: rgba(255, 20, 147, 0.1);
    color: #333;
}

.unsub-info-icon {
    color: #ff1493;
}

.unsub-profile-link {
    color: #ff1493;
    text-decoration: underline;
}

/* From: templates/account/verification_sent.html */
.verify-email-content p {
    color: var(--off-white);
    font-size: 1rem;
    line-height: 1.6;
}

.verify-email-content .alert {
    margin-top: 1.5rem;
    border: 2px solid rgba(30, 144, 255, 0.3);
    background-color: rgba(30, 144, 255, 0.1);
    color: var(--off-white);
}

.verify-email-content .alert-info {
    border-color: rgba(30, 144, 255, 0.3);
}

.verify-email-content hr {
    border-color: var(--gray);
    opacity: 0.3;
}

/* From: templates/checkout/activate_account.html */
.auth-header {
    padding: 30px 0;
}

.auth-icon {
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--neon-pink), var(--electric-yellow));
    box-shadow: 0 8px 20px rgba(255, 45, 161, 0.3);
    color: white;
    font-size: 40px;
}

/* Auth Icon Wrapper - for icon inside circle */
.auth-icon,
.auth-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
}
.auth-icon-wrapper {
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--neon-pink), var(--electric-yellow));
    box-shadow: 0 8px 25px rgba(255, 20, 147, 0.35);
    color: #000;
    font-size: 2rem;
}

/* Auth Card Title */
.auth-card-title {
    margin-bottom: 0.5rem;
    color: var(--off-white);
    font-weight: 700;
    font-size: 1.5rem;
}

/* Auth Message */
.auth-message {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Ghost Outline Button */
.btn-outline-ghost {
    padding: 0.5rem 1.5rem;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-outline-ghost:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    color: var(--off-white);
}

/* Light mode auth styles */
:root.light-mode .auth-card-title {
    color: #222;
}

:root.light-mode .auth-message {
    color: rgba(0, 0, 0, 0.65);
}

:root.light-mode .btn-outline-ghost {
    border-color: rgba(0, 0, 0, 0.2);
    color: rgba(0, 0, 0, 0.7);
}

:root.light-mode .btn-outline-ghost:hover {
    border-color: rgba(0, 0, 0, 0.35);
    background: rgba(0, 0, 0, 0.05);
    color: #222;
}

.text-link-pink {
    color: var(--neon-pink);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.text-link-pink:hover {
    color: var(--electric-yellow);
    text-decoration: underline;
}

.page-title {
    margin-bottom: 10px;
    color: white;
    font-weight: 700;
}

.alert-info {
    border-color: var(--neon-pink);
    background-color: rgba(255, 45, 161, 0.1);
    color: #e0e0e0;
}

.alert-info strong {
    color: var(--neon-pink);
}

/* From: templates/home/returns.html */
/* contact-page padding moved to vault-modals.css canonical wrapper */

/* contact-form-section styles consolidated to ui-components.css */

.shipping-content {
    padding: 2rem;
}

.shipping-intro {
    text-align: center;
}

.shipping-heading {
    margin-bottom: 1rem;
    color: var(--off-white);
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.shipping-description {
    max-width: 600px;
    margin: 0 auto;
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.6;
}

.shipping-regions {
    margin-top: 3rem;
}

.shipping-region {
    margin-bottom: 2rem;
    padding: 2rem;
    border: 1px solid var(--border-glass-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: var(--bg-glass-light);
    transition: all 0.3s ease;
}

.shipping-region:hover {
    border-color: rgba(255, 20, 147, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.region-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.region-icon {
    margin-right: 1rem;
    color: var(--neon-pink);
    font-size: 2rem;
}

.region-title {
    margin: 0;
    color: var(--off-white);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.return-requirement {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.return-requirement:last-child {
    border-bottom: none;
}

.requirement-title {
    color: var(--neon-pink);
    font-weight: 600;
    font-size: 1rem;
}

.requirement-detail {
    color: var(--gray);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Checkout spacing centralized in components.css (kept page-specific overrides if needed) */

.checkout-hero-stat {
    color: #ccc;
    font-size: 1rem;
}

.checkout-hero-stat i {
    margin-right: 0.5rem;
    color: var(--neon-pink);
}

.payment-section {
    padding: 2rem;
    border: 1px solid var(--border-glass-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: var(--bg-glass-light);
}

.payment-section h2 {
    margin-bottom: 1.5rem;
    color: var(--neon-pink);
    font-weight: 700;
}

.payment-section h2 i {
    margin-right: 0.5rem;
}

.checkout-sidebar.payment-sidebar {
    padding: 1.5rem;
    border: 1px solid var(--border-glass-color);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: var(--bg-glass-light);
}

.progress-bar-wrapper.horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    gap: 0;
}

.progress-bar-wrapper.horizontal .progress-step {
    display: flex;
    position: relative;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
}

.progress-bar-wrapper.horizontal .step-circle {
    display: flex;
    z-index: 2;
    position: relative;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 20, 147, 0.3);
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--off-white);
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.payment-section fieldset {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--neon-pink);
    border-radius: 8px;
    background-color: rgba(255, 20, 147, 0.02);
}

.payment-section legend {
    margin-bottom: 1.5rem;
    padding: 0;
    color: var(--neon-pink);
    font-weight: 700;
}

.security-notice {
    display: flex;
    align-items: center;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
    padding: 0.5rem 0.8rem;
    gap: 10px;
    border: 1px solid rgba(255, 20, 147, 0.04);
    border-radius: 8px;
    backdrop-filter: blur(6px);
    background: linear-gradient(180deg, rgba(255, 20, 147, 0.02), rgba(255, 20, 147, 0.01));
    color: var(--off-white);
    font-size: 0.92rem;
    opacity: 0.95;
}

.security-notice i {
    color: var(--electric-yellow);
    font-size: 0.95rem;
}

.security-notice span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.test-card-hint {
    display: block;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.2);
    color: #999999;
    font-weight: 500;
    font-size: 0.85rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.form-actions a,
.form-actions button {
    flex: 1;
}

/* Mobile responsive form actions */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
        padding: 0 5px;
        gap: 0.75rem;
    }

    .form-actions a,
    .form-actions button {
        flex: none;
        width: 100%;
        max-width: 100%;
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
}

/* .form-actions a.btn-pink moved to components.css for canonical styling */

.item-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border: 1px solid rgba(255, 20, 147, 0.15);
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.2);
}

.item-price {
    min-width: 80px;
    color: var(--electric-yellow);
    font-weight: 700;
    font-size: 1.3rem;
    text-align: right;
}

.order-totals {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(255, 20, 147, 0.2);
}

.total-row {
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.help-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border: 1px solid var(--neon-pink);
    border-radius: 8px;
    background-color: rgba(255, 20, 147, 0.05);
}

.field-error {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--neon-pink);
    border-radius: 4px;
    background-color: rgba(255, 20, 147, 0.1);
    color: var(--neon-pink);
    font-weight: 600;
    font-size: 0.875rem;
}

.is-invalid {
    border-color: var(--neon-pink);
    box-shadow: 0 0 0 0.2rem rgba(255, 20, 147, 0.25);
}

/* ---------------- Modern Cart Page Overrides ---------------- */
/* Apply checkout/shipping glass panel styles and modern layout */
.cart-container,
.cart-items-section,
.cart-summary,
.empty-cart {
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.03);
}

.cart-items-section {
    padding: 1.5rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 140px 110px 60px;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--border-radius-glass);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.cart-item:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.cart-item-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
}

.cart-item-details {
    padding-right: 0.5rem;
}
.cart-item-name {
    margin-bottom: 0.25rem;
    color: var(--off-white);
    font-size: 1rem;
}
.cart-item-specs {
    margin-bottom: 0.25rem;
    color: #bdbdbd;
    font-size: 0.85rem;
}

.cart-item-price,
.cart-item-subtotal {
    color: var(--off-white);
    font-weight: 700;
    text-align: right;
}

.qty-btn-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.qty-btn-sm:hover {
    transform: scale(1.05);
}
.qty-input-sm {
    width: 64px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    text-align: center;
}

.cart-item-actions,
.cart-item-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-summary {
    padding: 1.75rem;
}
.summary-title {
    color: var(--off-white);
    font-weight: 800;
}

.checkout-cta .checkout-btn {
    border: none;
    background: linear-gradient(90deg, rgba(255, 105, 180, 0.95), rgba(255, 235, 59, 0.95));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    color: var(--black);
}
.checkout-cta .checkout-btn.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.btn-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}
.btn-remove:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

/* Mobile stacking */
@media (max-width: 991px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-areas: "img details" "img quantity" "img subtotal" "img actions";
        grid-auto-rows: auto;
        gap: 0.5rem;
    }
    .cart-item-image {
        grid-area: img;
    }
    .cart-item-details {
        grid-area: details;
    }
    .cart-item-quantity {
        grid-area: quantity;
        margin-top: 0.5rem;
    }
    .cart-item-subtotal {
        grid-area: subtotal;
        margin-top: 0.5rem;
        text-align: left;
    }
    .cart-item-actions {
        grid-area: actions;
        margin-top: 0.5rem;
    }
    .checkout-cta .checkout-btn {
        width: 100%;
    }
}

/* End Modern Cart Overrides */

/* ================================================
   LIGHT MODE OVERRIDES
   ================================================ */
:root.light-mode .form-section {
    background-color: rgba(0, 0, 0, 0.03);
}

:root.light-mode .page-title {
    color: #000;
}

:root.light-mode .alert-info {
    color: #333;
}

:root.light-mode .return-requirement {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

:root.light-mode .checkout-hero-stat {
    color: #fff;
}

:root.light-mode .step-circle {
    background-color: rgba(0, 0, 0, 0.1);
}

:root.light-mode .security-notice span {
    color: rgba(0, 0, 0, 0.9);
}

:root.light-mode .test-card-hint {
    border-color: rgba(0, 0, 0, 0.1);
    color: #555;
}

:root.light-mode .test-card-hint,
:root.light-mode .item-summary {
    background-color: rgba(255, 255, 255, 0.5);
}

:root.light-mode .total-row {
    border-top-color: rgba(0, 0, 0, 0.06);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

:root.light-mode .cart-container,
:root.light-mode .cart-items-section,
:root.light-mode .cart-summary,
:root.light-mode .empty-cart {
    border-color: rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.02);
}

:root.light-mode .cart-item {
    border-color: rgba(0, 0, 0, 0.04);
}

:root.light-mode .cart-item:hover {
    border-color: rgba(0, 0, 0, 0.08);
}

:root.light-mode .cart-item-image {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
}

:root.light-mode .cart-item-specs {
    color: #555;
}

:root.light-mode .qty-input-sm,
:root.light-mode .btn-remove {
    border-color: rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.02);
}

/* Remove the general mobile column padding from profile page only */
@media (max-width: 768px) {
  .profile-page [class*="col-"] {
    padding: 0 0.2rem;
  }
}
