/**
 * Pure Comparison Order Form - Modern Edition
 *
 * Modernized, mobile-responsive styling for the Pure Comparison order template.
 *
 * @project   WHMCS
 * @version   2.0
 */

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */

:root {
    /* Colors - Orange/Coral Primary */
    --color-primary: #f97316;
    --color-primary-dark: #ea580c;
    --color-primary-light: #fb923c;
    
    /* Green for Featured/Popular Badge */
    --color-accent: #22c55e;
    --color-accent-dark: #16a34a;
    --color-accent-light: #4ade80;
    
    --color-success: #f97316;
    --color-warning: #f59e0b;
    
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;
    
    --color-white: #ffffff;
    
    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 40px rgba(34, 197, 94, 0.2);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ========================================
   Base Container
   ======================================== */

div#order-pure_comparison {
    padding: 0;
    margin: 0 0 var(--spacing-2xl) 0;
    min-height: 100%;
    width: 100%;
    line-height: 1.6;
    font-size: var(--font-size-base);
    font-family: var(--font-family);
    color: var(--color-gray-600);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Links
   ======================================== */

#order-pure_comparison a {
    outline: none;
    transition: color var(--transition-base), transform var(--transition-fast);
    color: var(--color-primary);
    text-decoration: none;
}

#order-pure_comparison a:hover {
    color: var(--color-primary-dark);
}

/* ========================================
   Reset
   ======================================== */

#order-pure_comparison div,
#order-pure_comparison ul,
#order-pure_comparison li {
    padding: 0;
    margin: 0;
}

/* ========================================
   Typography
   ======================================== */

#order-pure_comparison h1,
#order-pure_comparison h2 {
    color: var(--color-gray-900);
    font-weight: 700;
    line-height: 1.2;
}

#order-pure_comparison h3 {
    padding: 0;
    margin: 0;
    font-size: var(--font-size-3xl);
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-gray-900);
}

#order-pure_comparison h4 {
    padding: 0;
    margin: var(--spacing-sm) 0;
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-gray-800);
}

#order-pure_comparison h5 {
    padding: 0;
    margin: var(--spacing-xs) 0;
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
    font-weight: 400;
}

#order-pure_comparison .txt-center {
    padding-top: 0;
    text-align: center;
}

/* ========================================
   Alerts
   ======================================== */

#order-pure_comparison .alert {
    margin-top: var(--spacing-xl);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

/* ========================================
   Page Container
   ======================================== */

#order-pure_comparison .page-container {
    padding: 0 var(--spacing-md) var(--spacing-2xl);
    margin: 0 auto;
    max-width: 1400px;
}

/* ========================================
   Price Table Container
   ======================================== */

#order-pure_comparison .price-table-container {
    padding: var(--spacing-xl) 0 0 0;
    margin: 0;
}

#order-pure_comparison .price-table-container ul {
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: var(--spacing-lg);
}

#order-pure_comparison .price-table-container > ul > li {
    padding: var(--spacing-lg) 0;
    margin: 0;
    display: flex;
    background: none;
}

#order-pure_comparison .price-table-container > ul > li::before {
    content: none;
    display: none;
}

/* ========================================
   Price Table Card
   ======================================== */

#order-pure_comparison .price-table-container .price-table {
    padding: 0;
    margin: 0;
    width: 280px;
    background: var(--color-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-200);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

#order-pure_comparison .price-table-container .price-table:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Price Table Header
   ======================================== */

#order-pure_comparison .price-table-container .price-table .top-head {
    background: var(--color-white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-bottom: none;
}

#order-pure_comparison .price-table-container .price-table .top-head .top-area {
    padding: var(--spacing-lg);
    margin: 0;
    border-bottom: none;
}

#order-pure_comparison .price-table-container .price-table .top-head .top-area h4 {
    padding: 0;
    margin: 0;
    color: var(--color-gray-800);
    line-height: 1.3;
    font-weight: 600;
    font-size: var(--font-size-xl);
}

#order-pure_comparison .price-table-container .price-table .top-head .top-area h4::after {
    content: " ✦";
    color: var(--color-primary);
    font-size: 0.8em;
}

#order-pure_comparison .price-table-container .price-table .top-head .top-area p {
    padding: var(--spacing-xs) 0 0 0;
    margin: 0;
    color: var(--color-gray-500);
    font-size: var(--font-size-sm);
    line-height: 1.5;
}

/* ========================================
   Price Display (in header)
   ======================================== */

#order-pure_comparison .price-table-container .price-table .top-head .price-display {
    padding: var(--spacing-md) 0 var(--spacing-lg);
    text-align: center;
}

#order-pure_comparison .price-table-container .price-table .top-head .price-display .price-from {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
    margin-bottom: var(--spacing-xs);
}

#order-pure_comparison .price-table-container .price-table .top-head .price-display .price-amount {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--color-gray-900);
    line-height: 1;
}

#order-pure_comparison .price-table-container .price-table .top-head .price-display .price-cycle {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
    font-weight: 400;
    margin-left: var(--spacing-xs);
}

#order-pure_comparison .price-table-container .price-table .top-head .price-display .price-setup {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-gray-400);
    margin-top: var(--spacing-xs);
}

#order-pure_comparison .price-table-container .price-table .top-head .price-display .price-label {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-gray-700);
}

/* ========================================
   Price Table Features List
   ======================================== */

#order-pure_comparison .price-table-container .price-table ul,
#order-pure_comparison .price-table-container .price-table ul.features-list {
    padding: var(--spacing-md) var(--spacing-lg);
    margin: 0;
    list-style: none;
    display: block;
    flex: 1;
}

#order-pure_comparison .price-table-container .price-table ul li,
#order-pure_comparison .price-table-container .price-table ul.features-list li {
    padding: var(--spacing-sm) 0;
    margin: 0;
    width: 100%;
    border-bottom: none;
    color: var(--color-gray-600);
    text-align: left;
    line-height: 1.5;
    font-size: var(--font-size-sm);
    background: none;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
}

#order-pure_comparison .price-table-container .price-table ul li::before,
#order-pure_comparison .price-table-container .price-table ul.features-list li::before {
    content: "✓";
    color: var(--color-primary);
    font-weight: 600;
    font-size: var(--font-size-sm);
    flex-shrink: 0;
    margin-top: 1px;
}

#order-pure_comparison .price-table-container .price-table ul li .feature-value {
    font-weight: 600;
    color: var(--color-gray-800);
}

#order-pure_comparison .price-table-container .price-table ul li.product-description {
    display: block;
    padding-left: var(--spacing-lg);
}

#order-pure_comparison .price-table-container .price-table ul li.product-description::before {
    display: none;
}

#order-pure_comparison .price-table-container .price-table ul li a {
    color: var(--color-primary);
}

#order-pure_comparison .price-table-container .price-table ul li:last-child {
    border-bottom: 0;
}

/* ========================================
   Button Area (was Price Area)
   ======================================== */

#order-pure_comparison .price-table-container .price-area {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    margin: 0;
    background: var(--color-white);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

#order-pure_comparison .price-table-container .price-area .price {
    padding: var(--spacing-sm) 0;
    text-align: center;
}

#order-pure_comparison .price-table-container .price-area .price span {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--color-gray-900);
}

#order-pure_comparison .price-table-container .price-area .price small {
    font-size: var(--font-size-sm);
    color: var(--color-gray-500);
    font-weight: 400;
}

/* ========================================
   Order Button
   ======================================== */

#order-pure_comparison .price-table-container .order-button {
    padding: var(--spacing-md) var(--spacing-xl);
    margin: var(--spacing-md) 0 0 0;
    font-size: var(--font-size-base);
    color: var(--color-white);
    display: block;
    font-weight: 600;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    text-decoration: none;
    text-align: center;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
    border: none;
    cursor: pointer;
}

#order-pure_comparison .price-table-container .order-button::after {
    content: " →";
    font-weight: 400;
}

#order-pure_comparison .price-table-container .order-button:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

#order-pure_comparison .price-table-container .order-button.unavailable,
#order-pure_comparison .price-table-container .order-button.unavailable:hover {
    cursor: not-allowed;
    background: var(--color-gray-300);
    color: var(--color-gray-500);
    transform: none;
    box-shadow: none;
}

/* ========================================
   GROWTH PLAN - Featured/Active State
   ======================================== */

#order-pure_comparison .price-table-container .price-table.active {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
    border: 2px solid var(--color-accent);
    z-index: 10;
}

#order-pure_comparison .price-table-container .price-table.active:hover {
    transform: scale(1.05) translateY(-4px);
}

#order-pure_comparison .price-table-container .price-table.active .top-head {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-200);
}

#order-pure_comparison .price-table-container .price-table.active .top-head .top-area {
    padding: var(--spacing-lg);
}

#order-pure_comparison .price-table-container .price-table.active .top-head .top-area h4 {
    color: var(--color-gray-800);
}

#order-pure_comparison .price-table-container .price-table.active .top-head .top-area p {
    color: var(--color-gray-500);
}

#order-pure_comparison .price-table-container .price-table.active .price-area {
    background: var(--color-white);
}

#order-pure_comparison .price-table-container .price-table.active .price-area .price span {
    color: var(--color-gray-900);
}

#order-pure_comparison .price-table-container .price-table.active .order-button {
    background: var(--color-primary);
}

#order-pure_comparison .price-table-container .price-table.active .order-button:hover {
    background: var(--color-primary-dark);
    box-shadow: var(--shadow-lg);
}

#order-pure_comparison .price-table-container .price-table.active .price-area {
    background: var(--color-white);
}

/* ========================================
   Popular Plan Badge
   ======================================== */

#order-pure_comparison .price-table-container .price-table .popular-plan {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
}

#order-pure_comparison .price-table-container .price-table .popular-plan .plan-container {
    position: relative;
    background: none;
}

#order-pure_comparison .price-table-container .price-table .popular-plan .plan-container .txt-container {
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--color-accent);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    white-space: nowrap;
}

/* Adjust top-head padding when badge is present */
#order-pure_comparison .price-table-container .price-table.active .top-head {
    padding-top: var(--spacing-lg);
}

/* ========================================
   Includes Features Section
   ======================================== */

#order-pure_comparison .includes-features {
    margin: 0 auto;
    width: 100%;
    max-width: 900px;
    padding-top: var(--spacing-2xl);
}

#order-pure_comparison .includes-features .head-area {
    padding: 0;
    margin: 0 0 var(--spacing-lg) 0;
    text-align: center;
}

#order-pure_comparison .includes-features .head-area span {
    padding: var(--spacing-sm) var(--spacing-lg);
    margin: 0;
    display: inline-block;
    background: var(--color-white);
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-gray-800);
}

#order-pure_comparison .includes-features ul.list-features {
    padding: var(--spacing-lg) 0 0 0;
    margin: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

#order-pure_comparison .includes-features ul.list-features li {
    padding: var(--spacing-sm) 0 var(--spacing-sm) var(--spacing-xl);
    margin: 0;
    position: relative;
    color: var(--color-gray-600);
    font-size: var(--font-size-sm);
}

#order-pure_comparison .includes-features ul.list-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 600;
}

/* ========================================
   Sidebar
   ======================================== */

html, body {
    overflow-x: hidden;
}

.row-product-selection {
    position: relative;
    left: 0;
    transition: all var(--transition-base);
}

.product-selection-sidebar {
    position: absolute;
    top: 0;
    left: -300px;
    width: 300px;
    display: none;
}

#btnShowSidebar {
    margin: 0 0 var(--spacing-lg) 0;
}

/* ========================================
   RESPONSIVE - Tablet (768px and below)
   ======================================== */

@media screen and (max-width: 768px) {
    :root {
        --font-size-3xl: 1.75rem;
        --font-size-4xl: 2rem;
    }
    
    #order-pure_comparison .page-container {
        padding: 0 var(--spacing-md) var(--spacing-xl);
    }
    
    #order-pure_comparison .price-table-container > ul {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xl);
    }
    
    #order-pure_comparison .price-table-container > ul > li {
        padding: var(--spacing-md) 0;
        width: 100%;
        max-width: 340px;
    }
    
    #order-pure_comparison .price-table-container .price-table {
        width: 100%;
    }
    
    /* Reset scale on mobile - Growth plan appears first and larger */
    #order-pure_comparison .price-table-container .price-table.active {
        transform: none;
        order: -1;
    }
    
    #order-pure_comparison .price-table-container .price-table.active:hover {
        transform: translateY(-4px);
    }
    
    #order-pure_comparison .includes-features ul.list-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   RESPONSIVE - Mobile (480px and below)
   ======================================== */

@media screen and (max-width: 480px) {
    :root {
        --font-size-2xl: 1.25rem;
        --font-size-3xl: 1.5rem;
        --font-size-4xl: 1.75rem;
        --spacing-lg: 1.25rem;
        --spacing-xl: 1.5rem;
    }
    
    #order-pure_comparison .page-container {
        padding: 0 var(--spacing-sm) var(--spacing-lg);
    }
    
    #order-pure_comparison h3 {
        font-size: var(--font-size-2xl);
    }
    
    #order-pure_comparison .price-table-container > ul > li {
        max-width: 100%;
    }
    
    #order-pure_comparison .price-table-container .price-table {
        width: 100%;
        border-radius: var(--radius-lg);
    }
    
    #order-pure_comparison .price-table-container .price-table .top-head {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
    
    #order-pure_comparison .price-table-container .price-area {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }
    
    #order-pure_comparison .price-table-container .price-table ul li,
    #order-pure_comparison .price-table-container .price-table ul.features-list li {
        font-size: var(--font-size-sm);
    }
    
    #order-pure_comparison .includes-features ul.list-features {
        grid-template-columns: 1fr;
    }
    
    #order-pure_comparison .includes-features ul.list-features li {
        padding-left: var(--spacing-lg);
    }
    
    /* Popular badge adjustments */
    #order-pure_comparison .price-table-container .price-table .popular-plan .plan-container .txt-container {
        font-size: var(--font-size-xs);
        padding: var(--spacing-xs) var(--spacing-md);
    }
}

/* ========================================
   Accessibility & Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    #order-pure_comparison a,
    #order-pure_comparison .price-table-container .price-table,
    #order-pure_comparison .price-table-container .order-button,
    .row-product-selection {
        transition: none;
    }
    
    #order-pure_comparison .price-table-container .price-table:hover,
    #order-pure_comparison .price-table-container .price-table.active:hover {
        transform: none;
    }
}

/* ========================================
   Dark Mode Support (Optional)
   ======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --color-gray-50: #1f2937;
        --color-gray-100: #374151;
        --color-gray-200: #4b5563;
        --color-gray-300: #6b7280;
        --color-gray-400: #9ca3af;
        --color-gray-500: #d1d5db;
        --color-gray-600: #e5e7eb;
        --color-gray-700: #f3f4f6;
        --color-gray-800: #f9fafb;
        --color-gray-900: #ffffff;
        --color-white: #111827;
    }
    
    #order-pure_comparison .price-table-container .price-table {
        border-color: var(--color-gray-200);
    }
}