* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.appraisal-generator {
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.generator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: calc(100vh - 40px);
    min-height: 700px;
}

.form-panel, .preview-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.header p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.tab-navigation {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
}

.tab-button {
    background: none;
    border: none;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-size: 0.8rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 120px;
    justify-content: center;
}

.tab-button.active {
    color: #1e40af;
    border-bottom-color: #1e40af;
    background: white;
}

.tab-button:hover:not(.active) {
    color: #475569;
    background: #e2e8f0;
}

.tab-button i {
    width: 14px;
    height: 14px;
}

.tab-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.form-section {
    margin-bottom: 20px;
}

.section-title {
    color: #1e40af;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    width: 18px;
    height: 18px;
}

.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.info-box p {
    font-size: 0.9rem;
    color: #1e40af;
    margin: 0;
}

.form-group {
    margin-bottom: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-row.three-cols {
    grid-template-columns: 1fr 1fr 1fr;
}

label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #374151;
    font-size: 0.85rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: border-color 0.2s;
    height: 32px;
}

textarea {
    height: auto;
    min-height: 60px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
    height: auto;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

.quick-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.preset-button {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
}

.preset-button:hover {
    border-color: #1e40af;
    background: #eff6ff;
}

.preset-button.active {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    gap: 8px;
}

.nav-button {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 0.8rem;
    gap: 4px;
}

.nav-button:hover:not(:disabled) {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-button.copy-button {
    background: #059669;
    color: white;
    border-color: #059669;
}

.nav-button.copy-button:hover:not(:disabled) {
    background: #047857;
}

.nav-button.download-button {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
}

.nav-button.download-button:hover:not(:disabled) {
    background: #1d4ed8;
}

.nav-button.consult-button {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.nav-button.consult-button:hover:not(:disabled) {
    background: #b91c1c;
}

.nav-button i {
    width: 14px;
    height: 14px;
}

/* Preview Panel */
.preview-panel {
    position: relative;
}

.preview-header {
    background: #374151;
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.preview-header h2 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.preview-header p {
    font-size: 0.8rem;
    opacity: 0.8;
}

.preview-content {
    flex: 1;
    overflow-y: auto;
    background: #f9fafb;
}

.document-preview {
    font-family: 'Times New Roman', serif;
    font-size: 11pt;
    line-height: 1.5;
    color: #000;
    white-space: pre-wrap;
    background: white;
    padding: 20px;
    margin: 0;
    border: none;
    min-height: 100%;
}

.highlighted-text {
    background-color: #fff9c4;
    display: inline;
    padding: 1px 0;
    animation: highlight 2s ease-out;
}

@keyframes highlight {
    0% { background-color: #ffeb3b; }
    100% { background-color: #fff9c4; }
}

/* Risk Assessment */
.risk-assessment {
    margin-top: 15px;
}

.risk-assessment h4 {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 12px;
}

.risk-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    border-left: 4px solid;
}

.risk-item.high {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.risk-item.medium {
    background: #fffbeb;
    border-left-color: #d97706;
}

.risk-item.low {
    background: #f0fdf4;
    border-left-color: #16a34a;
}

.risk-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.risk-indicator.high {
    background: #dc2626;
}

.risk-indicator.medium {
    background: #d97706;
}

.risk-indicator.low {
    background: #16a34a;
}

.risk-content h4 {
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 0.9rem;
}

.risk-content p {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .generator-content {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .quick-presets {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .navigation-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .tab-navigation {
        flex-wrap: wrap;
    }
    
    .tab-button {
        min-width: 100px;
        font-size: 0.75rem;
    }
    
    .quick-presets {
        grid-template-columns: 1fr;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .nav-button {
        width: 100%;
        justify-content: center;
    }
}/* Enhanced Presets Styling */
.preset-info {
    background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
    border: 2px solid #3b82f6;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.preset-info p {
    color: #1e40af;
    font-weight: 500;
    margin: 0;
}

.enhanced-presets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.preset-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    min-height: 140px;
    display: flex;
    flex-direction: column;
}

.preset-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.preset-card.active {
    border-color: #1e40af;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
    box-shadow: 0 4px 20px rgba(30, 64, 175, 0.2);
}

.preset-icon {
    font-size: 2rem;
    margin-bottom: 8px;
    text-align: center;
}

.preset-content {
    flex: 1;
}

.preset-content h4 {
    color: #1e40af;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.2;
}

.preset-description {
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.3;
    margin-bottom: 10px;
}

.preset-pricing {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.base-fee {
    color: #059669;
    background: #ecfdf5;
    padding: 2px 6px;
    border-radius: 4px;
}

.hourly-rate {
    color: #dc2626;
    background: #fef2f2;
    padding: 2px 6px;
    border-radius: 4px;
}

.preset-check {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #16a34a;
}

.preset-check i {
    width: 20px;
    height: 20px;
}

.preset-benefits {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.preset-benefits h4 {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 10px;
}

.preset-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.preset-benefits li {
    padding: 4px 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
}

.preset-benefits strong {
    color: #374151;
}

/* Enhanced form styling */
.form-group label strong {
    color: #dc2626;
}

/* Enhanced risk assessment */
.risk-assessment h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 1rem;
    margin-bottom: 15px;
}

/* Responsive adjustments for presets */
@media (max-width: 768px) {
    .enhanced-presets {
        grid-template-columns: 1fr;
    }
    
    .preset-card {
        min-height: 120px;
    }
    
    .preset-pricing {
        flex-direction: column;
        gap: 6px;
    }
}

/* Additional spacing improvements */
.form-section {
    margin-bottom: 15px;
}

.info-box {
    margin-bottom: 12px;
}

.checkbox-group {
    margin-bottom: 10px;
}

.checkbox-group label {
    font-size: 0.85rem;
    line-height: 1.3;
}
/* Payment Modal Styles */
.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.payment-modal {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.payment-header {
    text-align: center;
    margin-bottom: 25px;
}

.payment-header h2 {
    color: #1e40af;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.payment-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.payment-features {
    margin-bottom: 25px;
}

.feature {
    padding: 8px 0;
    color: #374151;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.payment-price {
    text-align: center;
    margin-bottom: 25px;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: #1e40af;
    display: block;
}

.price-note {
    font-size: 0.8rem;
    color: #64748b;
    display: block;
    margin-top: 5px;
}

.payment-options {
    text-align: center;
    margin-top: 15px;
}

.backup-code-link, .backup-code-button {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 5px;
}

.backup-code-link:hover, .backup-code-button:hover {
    color: #374151;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #9ca3af;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: #374151;
}

/* Paywall Overlay */
.paywall-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(transparent, rgba(255,255,255,0.95) 30%, rgba(255,255,255,0.98) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.paywall-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    border: 2px solid #e2e8f0;
    pointer-events: all;
    max-width: 300px;
}

.paywall-content h3 {
    color: #1e40af;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.paywall-content p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.4;
}

.unlock-button {
    background: #1e40af;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 10px;
    width: 100%;
    transition: background-color 0.2s;
}

.unlock-button:hover {
    background: #1d4ed8;
}

.backup-code-button {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

/* Disable text selection on preview when not paid */
.document-preview {
    position: relative;
}

/* PayPal button styling */
#paypal-button-container {
    margin: 15px 0;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .payment-modal {
        padding: 20px;
        margin: 10px;
    }
    
    .paywall-overlay {
        height: 50%;
    }
    
    .paywall-content {
        margin: 10px;
        padding: 15px;
    }
}
