/* Patriot Showers Pricing Tool - Stylesheet */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    color: #1e293b;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.header {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    text-align: center;
}

.logo-text {
    font-size: 48px;
    font-weight: 800;
    color: #1e3a5f;
    letter-spacing: -0.5px;
}

.logo-underline {
    height: 8px;
    background: linear-gradient(to right, 
        #dc2626 0%, 
        #dc2626 48%, 
        white 48%, 
        white 52%, 
        #dc2626 52%, 
        #dc2626 100%
    );
    margin: 8px auto;
    max-width: 600px;
}

.subtitle {
    color: #64748b;
    font-size: 14px;
    margin-top: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 28px;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #dc2626;
}

/* Form Elements */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 16px;
}

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

label {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

select, input {
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

select:focus, input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Line Items */
.line-item {
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.line-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
}

.line-item-main {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 20px;
    align-items: center;
}

.line-item-sub {
    margin-left: 24px;
    padding: 12px;
    background: white;
    border-left: 4px solid #dc2626;
    margin-top: 12px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
    border-radius: 4px;
}

.item-name {
    font-size: 15px;
    color: #1e293b;
    font-weight: 600;
}

.item-color {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    margin-top: 4px;
}

.item-price {
    font-size: 18px;
    font-weight: 700;
    color: #059669;
    text-align: right;
}

/* Buttons */
.btn-remove {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

.btn-add {
    background: #1e3a5f;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    margin-top: 16px;
    width: 100%;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: #152a45;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(30, 58, 95, 0.3);
}

.btn-generate {
    background: #dc2626;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin: 8px 0;
    transition: all 0.2s ease;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
}

/* Pricing Summary */
.pricing-summary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    color: white;
    padding: 36px;
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 15px;
}

/* Customer Quote Modal */
.customer-quote, .order-sheet {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    overflow-y: auto;
    padding: 40px 20px;
    backdrop-filter: blur(4px);
}

.customer-quote.active, .order-sheet.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.quote-document {
    background: white;
    max-width: 900px;
    width: 100%;
    padding: 60px;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    margin: 20px 0;
}

.quote-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #dc2626;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-close:hover {
    background: #b91c1c;
    transform: rotate(90deg);
}

/* Price Tiers */
.price-tier {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.msrp-tier {
    border-color: #fb923c;
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
}

.day30-tier {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fefce8 0%, #ffffff 100%);
}

.supersaver-tier {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.tier-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

.tier-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 4px;
}

.tier-subtitle {
    font-size: 14px;
    color: #64748b;
}

.tier-price-container {
    text-align: right;
}

.tier-price {
    font-size: 32px;
    font-weight: 800;
    color: #dc2626;
    line-height: 1;
}

.discount-badge {
    background: #dc2626;
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
    display: inline-block;
    letter-spacing: 0.5px;
}

/* Payment Structure */
.payment-structure {
    background: #f8fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 15px;
}

.payment-row span {
    color: #475569;
}

.payment-row strong {
    color: #1e3a5f;
    font-weight: 700;
}

/* Payment Options */
.payment-options {
    display: grid;
    gap: 12px;
}

.payment-option {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.payment-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-amount {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 4px;
}

.payment-note {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* Toggle Button */
.btn-toggle-payment {
    background: #64748b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    width: 100%;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.btn-toggle-payment:hover {
    background: #475569;
}

/* Tier Selection Buttons */
.btn-select-tier {
    background: #1e3a5f;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    width: 100%;
    margin-top: 16px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-select-tier:hover {
    background: #152a45;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 58, 95, 0.4);
}

.btn-select-tier.btn-supersaver {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    font-size: 18px;
    padding: 16px 24px;
}

.btn-select-tier.btn-supersaver:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
}

/* Selection Confirmation */
.selection-confirmation {
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
    border: 3px solid #10b981;
    border-radius: 12px;
    padding: 32px;
    margin-top: 24px;
}

.btn-change-selection {
    background: #64748b;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-change-selection:hover {
    background: #475569;
}

.confirmed-tier {
    background: white;
    padding: 24px;
    border-radius: 8px;
    border: 2px solid #10b981;
}

.confirmed-tier-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 8px;
}

.confirmed-tier-price {
    font-size: 36px;
    font-weight: 800;
    color: #059669;
    margin-bottom: 16px;
}

/* Reveal Super Saver Button */
.btn-reveal-supersaver {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    width: 100%;
    margin-top: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-reveal-supersaver:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.4);
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #cbd5e1;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #10b981;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #059669;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #10b981;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #059669;
    transform: scale(1.1);
}

/* Quote Actions */
.quote-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}

.btn-print {
    background: #dc2626;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    .quote-document, .quote-document * {
        visibility: visible;
    }
    
    .quote-document {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 40px;
        box-shadow: none;
    }
    
    .quote-close, 
    .quote-actions,
    .btn-toggle-payment,
    .btn-reveal-supersaver {
        display: none !important;
    }
    
    .payment-option.hidden {
        display: block !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .line-item-main {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .item-price {
        text-align: left;
    }
    
    .quote-document {
        padding: 40px 24px;
    }
    
    .tier-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .tier-price-container {
        text-align: left;
    }
    
    .quote-actions {
        grid-template-columns: 1fr;
    }
}
