/* Roof Depreciation Calculator Styles */

.rdc-calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
    line-height: 1.6;
    color: inherit;
}

/* Header Styles */
.rdc-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.rdc-header h2 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
}

.rdc-header p {
    margin: 0;
    color: #6c757d;
    font-size: 1.1rem;
}

/* Step Navigation */
.rdc-step {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rdc-step-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.rdc-step-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 600;
}

.rdc-step-header p {
    margin: 0;
    font-size: 1.1rem;
    color: #7f8c8d;
}

.rdc-step-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

/* Form Styles */
.rdc-calculator-form {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.rdc-form-section {
    border: none;
    margin: 0 0 25px 0;
    padding: 0;
}

.rdc-form-section h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding: 0;
    border: none;
}

.rdc-form-group {
    margin-bottom: 25px;
}

.rdc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
    font-size: 1rem;
}

.rdc-form-group input[type="number"],
.rdc-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #ffffff;
}

.rdc-form-group input[type="number"]:focus,
.rdc-form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.rdc-form-group input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.rdc-help-text {
    display: block;
    margin-top: 5px;
    font-size: 0.875rem;
    color: #6c757d;
    font-style: italic;
}

.rdc-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.875rem;
}

.rdc-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* Form Actions */
.rdc-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.rdc-calculate-btn,
.rdc-reset-btn,
.rdc-next-btn,
.rdc-prev-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.rdc-calculate-btn {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.rdc-calculate-btn:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.rdc-reset-btn {
    background: #6c757d;
    color: white;
}

.rdc-reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.rdc-next-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.rdc-next-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.rdc-prev-btn {
    background: #6c757d;
    color: white;
}

.rdc-prev-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* Results Section */
.rdc-results {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rdc-results h3 {
    text-align: center;
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.rdc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.rdc-result-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rdc-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.rdc-result-card h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
}

.rdc-result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.rdc-result-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Chart Container */
.rdc-chart-container {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    min-height: 300px;
}

/* Results Actions */
.rdc-results-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.rdc-pdf-btn,
.rdc-new-calculation-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.rdc-pdf-btn {
    background: #dc3545;
    color: white;
}

.rdc-pdf-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.rdc-new-calculation-btn {
    background: #ffc107;
    color: #212529;
}

.rdc-new-calculation-btn:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Educational Content */
.rdc-educational-content {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.rdc-educational-content h3 {
    text-align: center;
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
}

.rdc-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rdc-accordion-item {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.rdc-accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rdc-accordion-item summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 15px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    list-style: none;
    position: relative;
}

.rdc-accordion-item summary:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.rdc-accordion-item summary::-webkit-details-marker {
    display: none;
}

.rdc-accordion-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: #6c757d;
    transition: transform 0.3s ease;
}

.rdc-accordion-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.rdc-accordion-content {
    padding: 20px;
    background: #ffffff;
    border-top: 1px solid #dee2e6;
}

.rdc-accordion-content h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.rdc-accordion-content p {
    margin: 0 0 15px 0;
    color: #495057;
    line-height: 1.6;
}

.rdc-accordion-content ul {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

.rdc-accordion-content li {
    margin-bottom: 8px;
    color: #495057;
}

.rdc-accordion-content strong {
    color: #2c3e50;
    font-weight: 600;
}

.rdc-accordion-content em {
    color: #6c757d;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rdc-calculator-container {
        padding: 15px;
    }
    
    .rdc-calculator-form,
    .rdc-results,
    .rdc-educational-content {
        padding: 20px;
    }
    
    .rdc-header h2 {
        font-size: 1.5rem;
    }
    
    .rdc-header p {
        font-size: 1rem;
    }
    
    .rdc-results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rdc-result-value {
        font-size: 1.5rem;
    }
    
    .rdc-form-actions,
    .rdc-results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .rdc-calculate-btn,
    .rdc-reset-btn,
    .rdc-pdf-btn,
    .rdc-new-calculation-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .rdc-calculator-container {
        padding: 10px;
    }
    
    .rdc-calculator-form,
    .rdc-results,
    .rdc-educational-content {
        padding: 15px;
    }
    
    .rdc-header {
        padding: 15px;
    }
    
    .rdc-form-group input[type="number"],
    .rdc-form-group select {
        padding: 10px 12px;
    }
    
    .rdc-accordion-item summary {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .rdc-accordion-content {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    /* Reset page margins and hide unnecessary elements */
    @page {
        margin: 0.5in;
        size: letter;
    }
    
    body {
        margin: 0;
        padding: 0;
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    /* Hide form and navigation elements */
    .rdc-calculator-form,
    .rdc-form-actions,
    .rdc-results-actions,
    .rdc-educational-content,
    .rdc-pdf-btn,
    .rdc-new-calculation-btn {
        display: none !important;
    }
    
    /* Clean up the calculator container */
    .rdc-calculator-container {
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
        border: none;
        background: #fff;
    }
    
    /* Clean up the header */
    .rdc-header {
        margin: 0 0 20px 0;
        padding: 0 0 15px 0;
        border-bottom: 2px solid #000;
        background: #fff;
    }
    
    .rdc-header h2 {
        margin: 0 0 10px 0;
        font-size: 18pt;
        font-weight: bold;
        color: #000;
    }
    
    .rdc-header p {
        margin: 0;
        font-size: 11pt;
        color: #333;
    }
    
    /* Clean up results section */
    .rdc-results {
        margin: 0;
        padding: 20px 0;
        box-shadow: none;
        border: none;
        background: #fff;
    }
    
    .rdc-results h3 {
        margin: 0 0 15px 0;
        font-size: 16pt;
        font-weight: bold;
        color: #000;
        border-bottom: 1px solid #000;
        padding-bottom: 5px;
    }
    
    /* Clean up result cards */
    .rdc-result-card {
        margin: 0 0 15px 0;
        padding: 15px;
        border: 1px solid #000;
        background: #fff;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .rdc-result-card h4 {
        margin: 0 0 8px 0;
        font-size: 12pt;
        font-weight: bold;
        color: #000;
    }
    
    .rdc-result-value {
        font-size: 14pt;
        font-weight: bold;
        color: #000;
    }
    
    .rdc-result-card p {
        margin: 5px 0 0 0;
        font-size: 10pt;
        color: #333;
    }
    
    /* Clean up results grid */
    .rdc-results-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin: 0 0 20px 0;
    }
    
    /* Clean up chart container */
    .rdc-chart-container {
        margin: 20px 0;
        padding: 15px;
        border: 1px solid #000;
        background: #fff;
        break-inside: avoid;
        page-break-inside: avoid;
        page-break-before: auto;
    }
    
    /* Ensure chart prints properly */
    canvas {
        max-width: 100%;
        height: auto;
    }
    
    /* Add a footer with calculation date */
    .rdc-results::after {
        content: "Generated on " attr(data-print-date);
        display: block;
        margin-top: 20px;
        padding-top: 10px;
        border-top: 1px solid #000;
        font-size: 10pt;
        color: #666;
        text-align: center;
    }
}

/* Accessibility Improvements */
.rdc-form-group input:focus,
.rdc-form-group select:focus,
.rdc-calculate-btn:focus,
.rdc-reset-btn:focus,
.rdc-pdf-btn:focus,
.rdc-new-calculation-btn:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.rdc-accordion-item summary:focus {
    outline: 2px solid #007bff;
    outline-offset: -2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .rdc-calculator-container {
        border: 2px solid #000;
    }
    
    .rdc-form-group input,
    .rdc-form-group select {
        border: 2px solid #000;
    }
    
    .rdc-result-card {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .rdc-calculator-container * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 