/* Patriot Showers Measurement Workbook - Enhanced Stylesheet */
/* Matching pricing tool branding with improved UX */

/* 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 - Exact match to pricing tool */
.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;
}

/* Auto-save Indicator */
.autosave-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.autosave-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.autosave-icon {
    font-size: 18px;
}

.autosave-text {
    color: #059669;
    font-weight: 600;
    font-size: 14px;
}

/* 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-content {
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.section-description {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 28px;
}

.subsection-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e3a5f;
    margin: 28px 0 16px;
}

/* Progress Bar */
.progress-card {
    padding: 20px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #e2e8f0;
    z-index: 0;
}

.progress-line {
    position: absolute;
    top: 20px;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e3a5f 0%, #dc2626 100%);
    transition: width 0.5s ease;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    background: white;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step:hover .step-number {
    transform: scale(1.05);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #1e3a5f;
    border-color: #1e3a5f;
    color: white;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.step.completed .step-number {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
}

.step-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-align: center;
}

.step.active .step-label {
    color: #1e3a5f;
    font-weight: 700;
}

/* 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;
}

.required {
    color: #dc2626;
}

select, input[type="text"], input[type="number"], input[type="tel"], input[type="email"], textarea {
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    font-family: inherit;
}

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

select:hover, input:hover, textarea:hover {
    border-color: #cbd5e1;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Radio & Checkbox Groups */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
}

.radio-item:hover {
    border-color: #1e3a5f;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.1);
    transform: translateY(-1px);
}

.radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-item span {
    font-weight: 600;
    color: #1e293b;
}

.radio-item.selected {
    border-color: #1e3a5f;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.05) 0%, rgba(220, 38, 38, 0.02) 100%);
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.15);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    background: white;
}

.checkbox-item:hover {
    border-color: #1e3a5f;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.1);
}

.checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-item span {
    font-weight: 500;
    color: #1e293b;
}

.checkbox-item.checked {
    border-color: #1e3a5f;
    background: rgba(30, 58, 95, 0.05);
}

/* Photo Upload */
.photo-count-badge {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
}

#photoCount {
    font-size: 24px;
    font-weight: 800;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.photo-upload-box {
    border: 3px dashed #cbd5e1;
    border-radius: 12px;
    padding: 32px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-upload-box:hover {
    border-color: #1e3a5f;
    background: rgba(30, 58, 95, 0.03);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.photo-upload-box.has-image {
    padding: 0;
    border: 3px solid #dc2626;
}

.photo-upload-box.has-image:hover {
    border-color: #b91c1c;
}

.photo-upload-box img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.photo-label {
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 8px;
    display: block;
    font-size: 15px;
}

.photo-instruction {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

.upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #dc2626;
}

.remove-photo {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc2626;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.photo-upload-box:hover .remove-photo {
    opacity: 1;
}

.remove-photo:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

/* Measurements Table */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.measurements-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.measurements-table th {
    background: #1e3a5f;
    color: white;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.measurements-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.measurements-table tr:hover td {
    background: #f8fafc;
}

.measurements-table tr:last-child td {
    border-bottom: none;
}

.measurements-table input {
    width: 100%;
}

/* Alerts */
.alert-info, .alert-success, .alert-warning {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.alert-info {
    background: #dbeafe;
    border: 2px solid #93c5fd;
    color: #1e40af;
}

.alert-success {
    background: #d1fae5;
    border: 2px solid #6ee7b7;
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    border: 2px solid #fcd34d;
    color: #92400e;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn-add {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    flex: 1;
    box-shadow: 0 4px 6px rgba(30, 58, 95, 0.2);
}

.btn-add:hover {
    background: linear-gradient(135deg, #152a45 0%, #1e3a5f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 58, 95, 0.3);
}

.btn-add:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: #1e3a5f;
    border: 2px solid #1e3a5f;
    padding: 16px 28px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #1e3a5f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 58, 95, 0.2);
}

.btn-generate {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    transition: all 0.3s ease;
    flex: 1;
    box-shadow: 0 4px 6px rgba(220, 38, 38, 0.2);
}

.btn-generate:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.3);
}

.btn-print {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 700;
    transition: all 0.3s ease;
    flex: 1;
    box-shadow: 0 4px 6px rgba(30, 58, 95, 0.2);
}

.btn-print:hover {
    background: linear-gradient(135deg, #152a45 0%, #1e3a5f 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(30, 58, 95, 0.3);
}

.btn-clear {
    background: #64748b;
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
}

.btn-clear:hover {
    background: #475569;
}

/* Summary */
.summary-section {
    background: #f8fafc;
    padding: 24px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    margin: 20px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 600;
    color: #475569;
}

.summary-value {
    color: #1e293b;
    font-weight: 500;
}

/* Utility Classes */
.section-hidden {
    display: none !important;
}

.hidden {
    display: none !important;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .progress-card,
    .button-group,
    .btn-add,
    .btn-secondary,
    .btn-generate,
    .btn-print,
    .btn-clear,
    .autosave-indicator,
    .photo-count-badge {
        display: none !important;
    }
    
    .card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
    
    .section-hidden {
        display: block !important;
    }
    
    .remove-photo {
        display: none !important;
    }
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
    .header {
        padding: 28px 20px;
    }
    
    .logo-text {
        font-size: 36px;
    }
    
    .card {
        padding: 20px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .photo-grid {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn-add, .btn-secondary {
        width: 100%;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .step {
        flex: 0 0 calc(33.333% - 8px);
    }
    
    .step-label {
        font-size: 0.65rem;
    }
    
    .measurements-table {
        font-size: 12px;
    }
    
    .measurements-table th,
    .measurements-table td {
        padding: 10px;
    }
    
    .autosave-indicator {
        top: 10px;
        right: 10px;
        padding: 8px 14px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 28px;
    }
    
    .step {
        flex: 0 0 calc(50% - 6px);
    }
    
    .step-number {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}
