/**
 * Hurricane Preparedness Cost Calculator Styles
 * Theme-agnostic, minimal styling
 */

/* Main calculator container */
.hpc-calculator {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Section styling */
.hpc-section {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.02);
}

.hpc-section-title {
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    font-size: 1.5em;
    font-weight: bold;
}

/* Form groups */
.hpc-form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
}

.hpc-form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.hpc-form-group input[type="number"],
.hpc-form-group select {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background-color: #fff;
    max-width: 300px;
}

.hpc-form-group input[type="number"]:focus,
.hpc-form-group select:focus {
    outline: none;
    border-color: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Checkbox groups */
.hpc-checkbox-group label {
    flex-direction: row;
    align-items: center;
    cursor: pointer;
}

.hpc-checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* Results display */
.hpc-result {
    margin-top: 1.5rem;
    padding: 1rem;
    border-left: 4px solid rgba(0, 0, 0, 0.2);
    background-color: rgba(0, 0, 0, 0.03);
}

.hpc-result strong {
    font-size: 1.1em;
}

.hpc-calculation-detail {
    margin-top: 0.5rem;
    font-size: 0.9em;
    opacity: 0.8;
    line-height: 1.6;
}

.hpc-warning {
    margin-top: 0.75rem;
    padding: 0.5rem;
    background-color: rgba(255, 200, 0, 0.1);
    border-left: 3px solid rgba(255, 200, 0, 0.8);
    font-size: 0.9em;
    display: none;
}

/* Summary section */
.hpc-summary {
    background-color: rgba(0, 0, 0, 0.05);
    border: 2px solid rgba(0, 0, 0, 0.15);
}

.hpc-summary-breakdown {
    margin-bottom: 1.5rem;
}

.hpc-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.hpc-summary-line dt,
.hpc-summary-line dd {
    margin: 0;
}

.hpc-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    margin-top: 1rem;
    border-top: 3px solid rgba(0, 0, 0, 0.3);
    font-size: 1.3em;
    font-weight: bold;
}

.hpc-summary-total dt,
.hpc-summary-total dd {
    margin: 0;
    font-weight: bold;
}

/* Disclaimer */
.hpc-disclaimer {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
    line-height: 1.6;
}

/* Buttons */
.hpc-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hpc-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.hpc-button:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.hpc-button:active:not(:disabled) {
    transform: translateY(0);
}

.hpc-button-primary {
    background-color: #0066cc;
    color: #fff;
}

.hpc-button-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.hpc-button-secondary {
    background-color: #666;
    color: #fff;
}

/* Responsive design */
@media (max-width: 768px) {
    .hpc-calculator {
        margin: 1rem auto;
        padding: 0 0.5rem;
    }
    
    .hpc-section {
        padding: 1rem;
    }
    
    .hpc-section-title {
        font-size: 1.3em;
    }
    
    .hpc-form-group input[type="number"],
    .hpc-form-group select {
        max-width: 100%;
    }
    
    .hpc-summary-total {
        font-size: 1.1em;
    }
    
    .hpc-actions {
        flex-direction: column;
    }
    
    .hpc-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hpc-section-title {
        font-size: 1.2em;
    }
    
    .hpc-summary-line,
    .hpc-summary-total {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .hpc-summary-line dt,
    .hpc-summary-line dd,
    .hpc-summary-total dt,
    .hpc-summary-total dd {
        text-align: left;
    }
    
    .hpc-summary-total dt {
        text-align: center;
    }
    
    .hpc-summary-total dd {
        text-align: center;
    }
}

/* Accessibility improvements */
.hpc-form-group input:invalid {
    border-color: rgba(200, 0, 0, 0.5);
}

.hpc-form-group input:focus:invalid {
    box-shadow: 0 0 0 3px rgba(200, 0, 0, 0.1);
}

/* Educational content sections */
.hpc-content {
    max-width: 800px;
    margin: 4rem auto 2rem;
    padding: 0 1rem;
}

.hpc-content-section {
    margin-bottom: 3rem;
    line-height: 1.8;
}

.hpc-content-section h2 {
    font-size: 1.8em;
    font-weight: bold;
    margin: 2rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.hpc-content-section h3 {
    font-size: 1.3em;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem 0;
}

.hpc-content-section p {
    margin-bottom: 1rem;
}

.hpc-content-section ul {
    margin: 1rem 0 1rem 2rem;
    list-style-type: disc;
}

.hpc-content-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.hpc-content-section a {
    color: #0066cc;
    text-decoration: underline;
}

.hpc-content-section a:hover {
    color: #0052a3;
}

.hpc-content-section a:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* FAQ Accordion */
.hpc-faq-section {
    margin-top: 3rem;
}

.hpc-faq-accordion {
    margin-top: 1.5rem;
}

.hpc-faq-item {
    margin-bottom: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.hpc-faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background-color: rgba(0, 0, 0, 0.02);
    border: none;
    text-align: left;
    font-size: 1.05em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.hpc-faq-question:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.hpc-faq-question:focus {
    outline: 2px solid rgba(0, 0, 0, 0.3);
    outline-offset: -2px;
}

.hpc-faq-question[aria-expanded="true"] {
    background-color: rgba(0, 0, 0, 0.05);
}

.hpc-faq-icon {
    font-size: 1.5em;
    font-weight: normal;
    min-width: 30px;
    text-align: center;
    margin-left: 1rem;
    color: rgba(0, 0, 0, 0.5);
}

.hpc-faq-answer {
    padding: 1.25rem;
    background-color: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.hpc-faq-answer p {
    margin: 0;
    line-height: 1.7;
}

.hpc-faq-answer a {
    color: #0066cc;
    text-decoration: underline;
}

/* Call to Action section */
.hpc-cta {
    padding: 2rem;
    background-color: rgba(0, 102, 204, 0.05);
    border: 2px solid rgba(0, 102, 204, 0.2);
    border-radius: 4px;
    text-align: center;
}

.hpc-cta h2 {
    margin-top: 0;
    color: #0066cc;
}

/* Print styles */
@media print {
    .hpc-actions {
        display: none;
    }
    
    .hpc-calculator {
        max-width: 100%;
    }
    
    .hpc-section {
        page-break-inside: avoid;
    }
    
    .hpc-content {
        margin-top: 2rem;
    }
    
    .hpc-faq-answer {
        display: block !important;
    }
    
    .hpc-faq-icon {
        display: none;
    }
}

/* Responsive styles for content */
@media (max-width: 768px) {
    .hpc-content {
        margin-top: 3rem;
    }
    
    .hpc-content-section h2 {
        font-size: 1.5em;
    }
    
    .hpc-content-section h3 {
        font-size: 1.2em;
    }
    
    .hpc-faq-question {
        padding: 0.875rem 1rem;
        font-size: 1em;
    }
    
    .hpc-faq-answer {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hpc-content-section h2 {
        font-size: 1.3em;
    }
    
    .hpc-content-section ul {
        margin-left: 1.5rem;
    }
    
    .hpc-faq-question {
        padding: 0.75rem;
    }
    
    .hpc-faq-icon {
        font-size: 1.3em;
        min-width: 25px;
    }
}

