/* ================================================
   HENDOSHI - PAGES - CHECKOUT
   ================================================
   
   Purpose: Checkout and payment page specific styling
   
   Contains:
   - Payment page overrides
   - Shipping modal styling
   - List group customizations
   - Checkout flow enhancements
   
   Dependencies: variables.css, checkout.css, ui-components.css
   Load Order: Load after checkout feature styles
   ================================================ */

/* ===== PAYMENT ===== */

/* Minimal page-scoped overrides kept short — main styling now lives in static/css/base.css */

/* Override Bootstrap list-group-item active state for shipping modal */
#shippingModal .list-group {
    border: none;
    background: transparent;
}

#shippingModal .list-group-item {
    margin-bottom: 0.5rem;
    border: 1px solid rgba(255, 20, 147, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 20, 147, 0.05);
    color: var(--off-white);
    transition: all 0.2s ease;
}

#shippingModal .list-group-item:hover {
    border-color: rgba(255, 20, 147, 0.25);
    background-color: rgba(255, 20, 147, 0.1);
}

#shippingModal .list-group-item.active {
    border-color: rgba(255, 20, 147, 0.3);
    background-color: rgba(255, 20, 147, 0.15);
    color: var(--off-white);
}

#shippingModal .list-group-item.active:hover {
    background-color: rgba(255, 20, 147, 0.2);
}

#shippingModal .form-check-input:checked {
    border-color: var(--neon-pink);
    background-color: var(--neon-pink);
}

/* Make free shipping text more visible */
#shippingModal .shipping-free-text {
    color: #cccccc;
    font-weight: 500;
}

/* Improve order totals table spacing and alignment */
.order-totals table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.order-totals table td {
    padding: 0.25rem 0;
    color: var(--off-white);
}

.order-totals table td:first-child {
    padding-right: 2rem;
    font-weight: 500;
}

.order-totals table td:last-child {
    min-width: 80px;
    font-weight: 600;
    text-align: right;
}

.order-totals table tr.total-row td {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.order-totals table tr.total-row td:last-child {
    color: var(--electric-yellow);
    font-size: 1.1rem;
}

/* Light Mode - Ensure text visibility */
:root.light-mode .order-totals table td {
    color: #222;
}

:root.light-mode .order-totals table td.text-muted {
    color: rgba(0, 0, 0, 0.6);
}

/* Style discount amount cell with inline edit icon */
.discount-label-cell {
    display: flex;
    position: relative;
    align-items: center;
    gap: 0.5rem;
}

.edit-discount-icon {
    padding: 0.2rem;
    border-radius: 3px;
    color: var(--neon-pink);
    font-size: 0.9rem;
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.edit-discount-icon:hover {
    background-color: rgba(255, 20, 147, 0.1);
    color: var(--neon-pink);
    opacity: 1;
}

/* Full-screen shipping modal on mobile */
@media (max-width: 576px) {
    #shippingModal .modal-dialog {
        max-width: 100%;
        min-height: 100vh;
        margin: 0;
    }

    #shippingModal .modal-content {
        min-height: 100vh;
        border: none;
        border-radius: 0;
    }

    #shippingModal .modal-body {
        flex: 1;
        overflow-y: auto;
    }

    #shippingModal .list-group-item {
        padding: 1rem;
    }
}

/* Return to cart link styling */
.return-to-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.return-to-cart-link:hover {
    color: var(--neon-pink);
}

/* Payment method logos */
.payment-methods {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    gap: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-method-icon {
    color: rgba(255, 255, 255, 0.6);
    font-size: 2.5rem;
    transition: all 0.3s ease;
}

.payment-method-icon:hover {
    transform: translateY(-3px);
    color: var(--neon-pink);
}

/* Ensure proper viewport height on mobile */
@media (max-width: 768px) {
    .checkout-page {
        min-height: auto;
        padding-bottom: 2rem;
        overflow-x: hidden;
    }

    .container-fluid.page-container {
        padding-right: 5px;
        padding-left: 5px;
        overflow-x: hidden;
    }

    .payment-section,
    .payment-form {
        overflow-x: hidden;
    }

    .payment-form {
        max-width: 100%;
    }

    .form-control,
    .input-group,
    .stripe-card-element {
        box-sizing: border-box;
        max-width: 100%;
    }

    .payment-methods {
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        gap: 0.75rem;
    }
}

/* Prevent content being cut off */
/* padding-bottom moved to page-specific needs removed to centralize spacing */

/* ===== ORDER_DETAIL ===== */

/* Tracking Card Enhancements */
.tracking-card {
    border: 2px solid rgba(255, 20, 147, 0.2);
    background: linear-gradient(135deg, rgba(255, 20, 147, 0.05), rgba(255, 20, 147, 0.02));
}

.tracking-number {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.carrier-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--neon-pink), #ff6fb5);
    box-shadow: 0 2px 8px rgba(255, 20, 147, 0.3);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.btn-copy-tracking {
    padding: 0.4rem 0.75rem;
    border: 1px solid rgba(255, 20, 147, 0.3);
    border-radius: 6px;
    background: rgba(255, 20, 147, 0.1);
    color: var(--neon-pink);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy-tracking:hover {
    transform: scale(1.05);
    background: var(--neon-pink);
    color: white;
}

.btn-track-package {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--neon-pink), #ff6fb5);
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-track-package:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 20, 147, 0.5);
    color: white;
    text-decoration: none;
}

.btn-track-package i {
    margin-right: 0.5rem;
}

/* Tracking Update Form */
.tracking-update-form {
    padding: 0.5rem;
}

.tracking-update-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 1rem;
    gap: 1rem;
}

.tracking-update-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
}

.tracking-update-field label i {
    margin-right: 0.5rem;
    color: var(--neon-pink);
}

.tracking-update-field .form-control {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    transition: all 0.3s ease;
}

.tracking-update-field .form-control:focus {
    border-color: var(--neon-pink);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 20, 147, 0.1);
}

.tracking-update-field .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-check-input:checked {
    border-color: var(--neon-pink);
    background-color: var(--neon-pink);
}

.form-check-label {
    margin-left: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Toast for copy feedback */
.copy-toast {
    z-index: 9999;
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius-glass);
    background: linear-gradient(135deg, var(--neon-pink), #ff6fb5);
    box-shadow: 0 10px 30px rgba(255, 20, 147, 0.3);
    color: white;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

/* @keyframes slideIn - defined in animations.css */

@media (max-width: 768px) {
    .tracking-update-fields {
        grid-template-columns: 1fr;
    }

    .tracking-number {
        flex-direction: column;
        align-items: flex-start;
        font-size: 1rem;
    }

    .copy-toast {
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
    }
}

/* Checkout page now uses the global hero rules from features/vault-community.css */

/* ================================================
   ACTIVATE ACCOUNT PAGE STYLES
   Extracted from templates/checkout/activate_account.html
   ================================================ */

.auth-header {
    padding: 30px 0;
}

.auth-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    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;
}

.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);
}

/* ================================================
   PAYMENT RESULT PAGE STYLES
   Extracted from templates/checkout/payment_result.html
   ================================================ */

.next-steps {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid var(--electric-yellow);
    border-radius: 12px;
    background: rgba(204, 255, 0, 0.05);
    text-align: left;
}

.next-steps h5 {
    margin-bottom: 1rem;
    color: var(--electric-yellow);
}

.next-steps ol {
    margin: 0;
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.next-steps strong {
    color: var(--neon-pink);
}

.next-steps p {
    margin: 0.5rem 0 0;
    color: var(--off-white);
    font-size: 0.95rem;
}

.error-details {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid #ff4757;
    border-radius: 12px;
    background: rgba(255, 71, 87, 0.1);
    text-align: left;
}

.error-box h5 {
    margin-bottom: 1rem;
    color: #ff4757;
}

.error-message {
    margin: 0;
    padding: 1rem;
    border-left: 3px solid #ff4757;
    border-radius: 4px;
    background: rgba(255, 71, 87, 0.05);
    color: var(--off-white);
    font-size: 0.95rem;
}

.failure-reasons {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    text-align: left;
}

.failure-reasons h5 {
    margin-bottom: 1rem;
    color: var(--neon-pink);
}

.failure-reasons ul {
    margin: 0;
    padding-left: 1.5rem;
}

.failure-reasons li {
    margin-bottom: 0.75rem;
    color: var(--off-white);
    line-height: 1.5;
}

.order-info-failed {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid var(--neon-pink);
    border-radius: 12px;
    background: rgba(255, 20, 147, 0.05);
    text-align: left;
}

.order-info-failed p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    margin: 2rem 0;
    gap: 1rem;
}

.action-buttons .btn {
    width: 100%;
    padding: 1rem 2rem;
    font-weight: 700;
    font-size: 1rem;
}

.alternative-section,
.support-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.2);
    text-align: left;
}

.alternative-section h6,
.support-section h6 {
    margin-bottom: 0.75rem;
    color: var(--neon-pink);
}

.alternative-section p,
.support-section p {
    margin: 0;
    color: var(--off-white);
    font-size: 0.95rem;
    line-height: 1.6;
}

.support-section a {
    color: var(--electric-yellow);
    font-weight: 700;
    text-decoration: none;
}

.support-section a:hover {
    text-decoration: underline;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .result-card {
        padding: 2rem 1.5rem;
    }

    .result-icon {
        font-size: 3rem;
    }

    .result-title {
        font-size: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }
}

/* ================================================
   LIGHT MODE OVERRIDES
   ================================================ */
:root.light-mode #shippingModal .list-group-item {
    color: #1a1a1a;
}

:root.light-mode .shipping-free-text {
    color: #555;
}

:root.light-mode .order-totals table tr.total-row td {
    border-top-color: rgba(0, 0, 0, 0.2);
}

:root.light-mode .return-to-cart-link {
    color: rgba(0, 0, 0, 0.7);
}

:root.light-mode .payment-methods {
    border-top-color: rgba(0, 0, 0, 0.1);
}

:root.light-mode .payment-method-icon {
    color: rgba(0, 0, 0, 0.6);
}

:root.light-mode .tracking-card-empty,
:root.light-mode .tracking-update-form {
    background: rgba(0, 0, 0, 0.02);
}

:root.light-mode .tracking-update-field label {
    color: rgba(0, 0, 0, 0.8);
}

:root.light-mode .tracking-update-field .form-control {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.9);
    color: #000;
}

:root.light-mode .tracking-update-field .form-control:focus {
    background: #fff;
}

:root.light-mode .tracking-update-field .form-control::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

/* form-check-label color consolidated into central light-mode rule */

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

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

:root.light-mode .failure-reasons {
    background: rgba(255, 255, 255, 0.6);
}

:root.light-mode .alternative-section,
:root.light-mode .support-section {
    background: rgba(255, 255, 255, 0.5);
}
