/**
 * ScoreNavigator Shop Cart Styles
 * Based on cart-mockup-v4.html
 */

:root {
    --sn-primary: #334d7a;
    --sn-primary-light: #4a6491;
    --sn-accent: #f17425;
    --sn-accent-light: #ff8f4a;
    --sn-dark: #0f172a;
    --sn-gray-50: #f8fafc;
    --sn-gray-100: #f1f5f9;
    --sn-gray-200: #e2e8f0;
    --sn-gray-300: #cbd5e1;
    --sn-gray-400: #94a3b8;
    --sn-gray-600: #475569;
    --sn-gray-900: #0f172a;
    --sn-success: #22c55e;
    --sn-gradient: linear-gradient(135deg, #334d7a 0%, #1e3a5f 100%);
}

* {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    box-sizing: border-box;
}

body.cart {
    background: #eef2f7;
    min-height: 100vh;
    margin: 0;
}

/* ============================================
   SIDEBAR
   ============================================ */
.cart-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 320px;
    background: var(--sn-gradient);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    color: white;
    z-index: 100;
}

@media (max-width: 1200px) {
    .cart-sidebar {
        position: relative;
        width: 100%;
        padding: 1.5rem;
    }
    .cart-main {
        margin-left: 0 !important;
    }
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 3rem;
}

.sidebar-logo img {
    max-width: 220px;
    height: auto;
}

.sidebar-logo span {
    color: var(--sn-accent);
}

/* Progress Steps - Vertical */
.sidebar-steps {
    flex: 1;
}

.sidebar-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    opacity: 0.5;
    transition: all 0.3s;
    cursor: default;
    user-select: none;
}

.sidebar-step.active {
    opacity: 1;
}

.sidebar-step.completed {
    opacity: 0.8;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.sidebar-step.active .step-indicator {
    background: var(--sn-accent);
    border-color: var(--sn-accent);
}

.sidebar-step.completed .step-indicator {
    background: var(--sn-success);
    border-color: var(--sn-success);
}

.step-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.step-content p {
    font-size: 0.75rem;
    margin: 0;
    opacity: 0.7;
}

.step-line {
    width: 2px;
    height: 30px;
    background: rgba(255,255,255,0.2);
    margin-left: 15px;
}

/* Sidebar Summary */
.sidebar-summary {
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: auto;
}

.summary-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 1rem;
}

.summary-plan-name {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.summary-plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--sn-accent);
}

/* Price value - keep large orange styling */
.summary-plan-price #sidebarPlanPrice {
    font-size: inherit;
    font-weight: inherit;
    opacity: 1;
}

/* Period text - smaller and faded */
.summary-plan-price #sidebarPlanPeriod {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.7;
    color: white;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.cart-main {
    margin-left: 320px;
    min-height: 100vh;
    padding: 2rem 3rem;
}

@media (max-width: 768px) {
    .cart-main {
        padding: 1.5rem;
    }
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.cart-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--sn-gray-900);
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--sn-gray-100);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--sn-gray-600);
}

.secure-badge i {
    color: var(--sn-success);
}

/* ============================================
   PARTNER BANNER
   ============================================ */
.partner-banner {
    background: linear-gradient(135deg, var(--sn-gray-100) 0%, white 100%);
    border: 1px solid var(--sn-gray-200);
    border-radius: 16px;
    padding: 1.25rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.partner-banner-text {
    font-size: 0.85rem;
    color: var(--sn-gray-600);
    font-weight: 500;
}

.partner-banner img {
    max-height: 60px;
    object-fit: contain;
}

/* ============================================
   BILLING TABS
   ============================================ */
.billing-tabs {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 0.375rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow-x: auto;
}

.billing-tab {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--sn-gray-600);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.billing-tab:hover {
    color: var(--sn-primary);
}

.billing-tab.active {
    background: var(--sn-primary);
    color: white;
}

.billing-tab .discount {
    position: absolute;
    top: -6px;
    right: 4px;
    background: var(--sn-accent);
    color: white;
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
}

/* ============================================
   PLAN ROWS
   ============================================ */
.plans-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.plan-row {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 1.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.plan-row:hover {
    border-color: var(--sn-gray-200);
    transform: translateX(4px);
}

.plan-row.selected {
    border-color: var(--sn-primary);
    background: linear-gradient(135deg, rgba(51,77,122,0.03) 0%, white 100%);
}

.plan-row.popular {
    position: relative;
}

.plan-row.popular::after {
    content: 'BEST VALUE';
    position: absolute;
    top: -10px;
    right: 20px;
    background: var(--sn-accent);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.plan-radio {
    width: 24px;
    height: 24px;
    border: 2px solid var(--sn-gray-300);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.plan-row.selected .plan-radio {
    border-color: var(--sn-primary);
    background: var(--sn-primary);
}

.plan-row.selected .plan-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.plan-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sn-gray-900);
    margin: 0 0 0.25rem 0;
}

.plan-info p {
    font-size: 0.8rem;
    color: var(--sn-gray-600);
    margin: 0;
}

.plan-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.plan-feature {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--sn-gray-600);
    background: var(--sn-gray-100);
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
}

.plan-feature i {
    color: var(--sn-success);
    font-size: 0.7rem;
}

.plan-price {
    text-align: right;
}

.plan-price .amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sn-gray-900);
}

.plan-price .period {
    font-size: 0.8rem;
    color: var(--sn-gray-600);
}

@media (max-width: 992px) {
    .plan-row {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }
    .plan-features {
        grid-column: span 2;
    }
    .plan-price {
        grid-row: 1;
        grid-column: 2;
        text-align: right;
    }
}

/* ============================================
   FORM SECTIONS
   ============================================ */
.form-section {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sn-gray-200);
}

.form-section-number {
    width: 36px;
    height: 36px;
    background: var(--sn-primary);
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.form-section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--sn-gray-900);
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full {
    grid-column: span 2;
}

@media (max-width: 576px) {
    .form-group.full {
        grid-column: span 1;
    }
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sn-gray-600);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: #ef4444;
}

.form-input {
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--sn-gray-200);
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.2s;
    outline: none;
    background: var(--sn-gray-50);
}

.form-input:focus {
    border-color: var(--sn-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(51,77,122,0.1);
}

.form-input::placeholder {
    color: var(--sn-gray-400);
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

/* ============================================
   PAYMENT CARD VISUAL
   ============================================ */
.payment-card-visual {
    background: linear-gradient(135deg, var(--sn-primary) 0%, var(--sn-primary-light) 100%);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.payment-card-visual::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.card-chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 6px;
    margin-bottom: 1.5rem;
}

.card-number {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    font-family: 'Courier New', monospace;
}

.card-details {
    display: flex;
    justify-content: space-between;
}

.card-detail-label {
    font-size: 0.65rem;
    opacity: 0.7;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.card-detail-value {
    font-size: 0.875rem;
    font-weight: 600;
}

/* ============================================
   PROMO INPUT
   ============================================ */
.promo-inline {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.promo-inline input {
    flex: 1;
    max-width: 300px;
}

.promo-btn {
    background: var(--sn-gray-900);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.promo-btn:hover {
    background: var(--sn-gray-600);
}

.promo-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #d4edda;
    border-radius: 10px;
    color: #155724;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.promo-success i {
    color: var(--sn-success);
}

/* ============================================
   TERMS CONTAINER
   ============================================ */
.terms-container {
    height: 200px;
    overflow-y: auto;
    border: 1px solid var(--sn-gray-200);
    border-radius: 10px;
    background: var(--sn-gray-50);
    padding: 1rem;
    font-size: 0.7rem;
    line-height: 1.6;
    color: var(--sn-gray-600);
    margin-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: #adb5bd #e9ecef;
}

.terms-container::-webkit-scrollbar {
    width: 8px;
}

.terms-container::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.terms-container::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 4px;
}

.terms-container::-webkit-scrollbar-thumb:hover {
    background: #868e96;
}

.terms-container h6 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--sn-gray-600);
    margin: 1rem 0 0.5rem 0;
}

.terms-container h6:first-child {
    margin-top: 0;
}

.terms-container p {
    margin-bottom: 0.5rem;
}

/* Scroll Indicator */
.scroll-indicator {
    text-align: center;
    margin-bottom: 1rem;
}

.scroll-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.scroll-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.scroll-badge.success {
    background: #d4edda;
    color: #155724;
}

.scroll-badge:hover {
    transform: scale(1.02);
}

/* ============================================
   CHECKBOX
   ============================================ */
.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.checkbox-row input {
    width: 20px;
    height: 20px;
    accent-color: var(--sn-primary);
    margin-top: 2px;
}

.checkbox-row label {
    font-size: 0.8rem;
    color: var(--sn-gray-600);
    line-height: 1.5;
}

.checkbox-row label a {
    color: var(--sn-primary);
}

/* ============================================
   AUTO-RENEWAL CALLOUT
   ============================================ */
.auto-renewal-callout {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 400px;
}

.auto-renewal-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--sn-primary) 0%, var(--sn-primary-light) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background 0.3s ease;
}

.auto-renewal-icon.active {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.auto-renewal-content {
    flex: 1;
    min-width: 0;
}

.auto-renewal-content h4 {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--sn-gray-900);
    margin: 0 0 0.125rem 0;
}

.auto-renewal-content p {
    font-size: 0.7rem;
    color: var(--sn-gray-600);
    margin: 0;
    line-height: 1.3;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--sn-success);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--sn-gray-600);
    text-align: center;
    margin-top: 0.25rem;
}

.toggle-label.active {
    color: var(--sn-success);
}

/* ============================================
   SUBMIT BUTTON & ROW
   ============================================ */
.submit-btn {
    background: var(--sn-accent);
    color: white;
    border: none;
    padding: 1.125rem 3rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.submit-btn:hover {
    background: var(--sn-accent-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(241,116,37,0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.trust-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--sn-gray-600);
}

.trust-icon i {
    font-size: 1.25rem;
    color: var(--sn-success);
}

.trust-icons-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-left: auto;
}

/* ============================================
   AUTHENTICATION PAGE STYLES
   ============================================ */
.auth-container {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.auth-notice {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.auth-notice i {
    font-size: 1.5rem;
    color: var(--sn-primary);
}

.auth-notice-content h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--sn-gray-900);
    margin: 0 0 0.25rem 0;
}

.auth-notice-content p {
    font-size: 0.8rem;
    color: var(--sn-gray-600);
    margin: 0;
}

.auth-question {
    background: var(--sn-gray-50);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.auth-question h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--sn-gray-900);
    margin: 0 0 1rem 0;
}

.auth-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--sn-gray-200);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.auth-option:hover {
    border-color: var(--sn-primary);
}

.auth-option.selected {
    border-color: var(--sn-primary);
    background: rgba(51,77,122,0.05);
}

.auth-option input[type="radio"] {
    accent-color: var(--sn-primary);
}

.auth-option label {
    font-size: 0.85rem;
    color: var(--sn-gray-600);
    cursor: pointer;
}

/* ============================================
   CONFIRMATION PAGE STYLES
   ============================================ */
.confirm-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.confirm-success i {
    font-size: 3rem;
    color: var(--sn-success);
    margin-bottom: 1rem;
}

.confirm-success h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #155724;
    margin: 0 0 0.5rem 0;
}

.confirm-success p {
    font-size: 0.9rem;
    color: #155724;
    margin: 0;
}

.confirm-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.confirm-error i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.confirm-error h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #721c24;
    margin: 0 0 0.5rem 0;
}

.confirm-error p {
    font-size: 0.9rem;
    color: #721c24;
    margin: 0;
}

.confirm-details {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.confirm-details h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--sn-gray-900);
    margin: 0 0 1rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--sn-gray-200);
}

.confirm-details p {
    font-size: 0.9rem;
    color: var(--sn-gray-600);
    margin: 0 0 1rem 0;
    line-height: 1.6;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.hidden {
    display: none !important;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
