/**
 * Gas Fireplace Calculators CSS
 * Styled to match Lestin theme
 */

/* ================================
   Base Calculator Styles
   ================================ */

.gf-calculator {
    background: #ffffff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 30px;
    margin: 40px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.gf-calculator:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

[x-cloak] {
    display: none !important;
}

/* Calculator Header */
.calculator-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.calculator-title {
    font-size: 28px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 10px;
    line-height: 1.3;
}

.calculator-icon {
    font-size: 36px;
    margin-right: 10px;
    vertical-align: middle;
}

.calculator-subtitle {
    font-size: 16px;
    color: #666666;
    margin: 0;
}

.calculator-body {
    padding-top: 10px;
}

/* ================================
   Form Elements
   ================================ */

.calculator-form .form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 8px;
}

.form-label strong {
    color: #222222;
}

.form-hint {
    display: block;
    font-size: 13px;
    color: #888888;
    margin-top: 6px;
    font-style: italic;
}

.form-control,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: #ffffff;
    color: #333333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

select.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Range Slider */
.form-range {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.form-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #007bff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: none;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: #888888;
}

.unit-display {
    display: inline-block;
    background: #007bff;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-left: 10px;
}

/* Form Row (Two Columns) */
.form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

/* Override Bootstrap/theme pseudo-elements that interfere with grid */
.form-row::before,
.form-row::after {
    display: none !important;
    content: none !important;
}

.form-row .form-group {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .form-row .form-group {
        margin-bottom: 0;
    }
}

/* ================================
   Add-ons & Checkboxes
   ================================ */

.addon-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.addon-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.addon-checkbox:hover {
    border-color: #dc3545;
    background: #fff5f5;
}

.addon-checkbox input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.addon-checkbox span {
    flex: 1;
}

.addon-price {
    font-weight: 600;
    color: #dc3545;
    font-size: 14px;
}

/* ================================
   Price Display
   ================================ */

.price-result {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    margin: 30px 0;
    text-align: center;
}

.price-header h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #ffffff;
    opacity: 0.95;
}

.price-display {
    margin-bottom: 15px;
}

.price-range {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.price-breakdown {
    background: rgba(255, 255, 255, 0.15);
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 15px;
    color: #ffffff;
}

.price-note {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin: 15px 0 0 0;
}

.price-note i {
    margin-right: 6px;
}

/* ================================
   Quote Request Section
   ================================ */

.quote-request-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 14px;
    color: #666666;
    margin-bottom: 20px;
}

.form-disclaimer {
    font-size: 12px;
    color: #888888;
    text-align: center;
    margin-top: 15px;
    line-height: 1.5;
}

/* ================================
   Buttons
   ================================ */

.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn i {
    margin-right: 8px;
}

.btn-primary {
    background: #dc3545;
    color: #ffffff;
}

.btn-primary:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-warning {
    background: #ffc107;
    color: #333333;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-danger {
    background: #dc3545;
    color: #ffffff;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ================================
   Alerts
   ================================ */

.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert i {
    font-size: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ================================
   Repair/Replace Quiz Styles
   ================================ */

.quiz-progress {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc3545 0%, #ff6b6b 100%);
    transition: width 0.4s ease;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #666666;
    margin-top: 10px;
}

.quiz-questions {
    min-height: 300px;
}

.quiz-question {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-title {
    font-size: 20px;
    font-weight: 600;
    color: #333333;
    margin-bottom: 20px;
}

.question-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
}

.option-btn:hover {
    border-color: #dc3545;
    background: #fff5f5;
    transform: translateY(-2px);
}

.option-btn.selected {
    border-color: #dc3545;
    background: #dc3545;
    color: #ffffff;
}

.option-text {
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.option-icon {
    font-size: 28px;
}

/* Checkbox Options */
.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-checkbox {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.option-checkbox:hover {
    border-color: #dc3545;
    background: #fff5f5;
}

.option-checkbox.selected {
    border-color: #dc3545;
    background: #fff5f5;
}

.option-checkbox input[type="checkbox"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

/* Quiz Results */
.quiz-results {
    animation: fadeIn 0.5s ease;
    padding-top: 30px;
}

.quiz-results > .btn-secondary {
    display: block;
    margin: 20px auto 0 auto;
    max-width: 250px;
}

.results-badge {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.results-badge.repair {
    background: linear-gradient(135deg, #dc3545 0%, #ff4757 100%);
    color: #ffffff;
}

.results-badge.consider-both {
    background: linear-gradient(135deg, #ff6347 0%, #ffa500 100%);
    color: #ffffff;
    margin-top: 30px;
}

.results-badge.replace {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    color: #ffffff;
}

.badge-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.badge-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.results-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.results-explanation {
    font-size: 16px;
    line-height: 1.7;
    color: #333333;
    margin-bottom: 30px;
}

.cost-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 600px) {
    .cost-comparison {
        grid-template-columns: 1fr;
    }
}

.cost-column {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.cost-column h5 {
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 10px;
}

.cost-value {
    font-size: 28px;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 15px;
}

.cost-pros {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cost-pros li {
    font-size: 14px;
    color: #666666;
    padding: 4px 0;
}

.results-cta {
    text-align: center;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 20px;
}

.results-cta h4 {
    font-size: 20px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 10px;
}

.results-cta p {
    color: #666666;
    margin-bottom: 20px;
}

/* ================================
   CO Risk Assessment Styles
   ================================ */

.risk-checklist {
    margin-bottom: 30px;
}

.checklist-intro {
    font-size: 16px;
    color: #333333;
    margin-bottom: 20px;
    font-weight: 600;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
}

.checklist-item:hover {
    border-color: #dc3545;
    background: #fff5f5;
}

.checklist-item.checked {
    border-color: #dc3545;
    background: #fff5f5;
}

.checklist-item input[type="checkbox"] {
    display: none;
}

.checkbox-icon {
    font-size: 24px;
    margin-right: 12px;
    color: #dc3545;
    min-width: 24px;
}

.checkbox-text {
    flex: 1;
}

.checkbox-text strong {
    display: block;
    font-size: 15px;
    color: #333333;
    margin-bottom: 4px;
}

.checkbox-text small {
    display: block;
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
}

/* Risk Results */
.risk-results {
    animation: fadeIn 0.5s ease;
}

.risk-badge {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.risk-badge.low {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #ffffff;
}

.risk-badge.medium {
    background: linear-gradient(135deg, #ffa500 0%, #ff6347 100%);
    color: #ffffff;
}

.risk-badge.high {
    background: linear-gradient(135deg, #dc3545 0%, #ff6348 100%);
    color: #ffffff;
}

.risk-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.risk-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.risk-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
}

.risk-content {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.risk-message {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.risk-message.low {
    background: #d4edda;
    border-left: 4px solid #28a745;
}

.risk-message.medium {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.risk-message.high {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
}

.risk-message h5 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.risk-message p {
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.recommended-actions {
    background: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.recommended-actions h5 {
    font-size: 16px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 15px;
}

.action-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.action-list li {
    padding: 8px 0 8px 24px;
    font-size: 14px;
    color: #333333;
    line-height: 1.5;
    position: relative;
}

.action-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #dc3545;
    font-weight: 700;
}

.emergency-alert {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #fff5f5;
    border: 2px solid #dc3545;
    border-radius: 8px;
    margin-bottom: 20px;
}

.emergency-alert i {
    font-size: 32px;
    color: #dc3545;
}

.emergency-alert strong {
    display: block;
    font-size: 16px;
    color: #dc3545;
    margin-bottom: 8px;
}

.emergency-alert p {
    font-size: 14px;
    color: #333333;
    line-height: 1.6;
    margin: 0;
}

.risk-cta {
    text-align: center;
    margin-top: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888888;
    font-size: 15px;
}

.empty-state i {
    font-size: 24px;
    margin-right: 8px;
}

/* ================================
   Sidebar Widget Styles
   ================================ */

.location-widget.widget-co-risk {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.location-widget.widget-co-risk .gf-calculator {
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.location-widget.widget-co-risk .calculator-header {
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.location-widget.widget-co-risk .calculator-title {
    font-size: 18px;
}

.location-widget.widget-co-risk .calculator-icon {
    font-size: 24px;
}

.location-widget.widget-co-risk .calculator-subtitle {
    font-size: 13px;
}

/* Accordion Styling */
.widget-co-risk .widget-title {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.widget-co-risk .widget-title:hover {
    color: #dc3545;
}

.widget-co-risk .widget-title .title-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-co-risk .widget-title .toggle-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666666;
}

.widget-co-risk .widget-title .toggle-indicator i {
    transition: transform 0.3s ease;
    font-size: 16px;
}

.widget-co-risk .widget-title .click-hint {
    font-size: 11px;
    color: #888888;
    font-weight: normal;
    font-style: italic;
}

.widget-co-risk .widget-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.widget-co-risk.open .widget-content {
    max-height: 5000px;
}

/* Button Row Layout */
.risk-button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .risk-button-row {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 768px) {
    .gf-calculator {
        padding: 20px;
        margin: 30px 0;
    }

    .calculator-title {
        font-size: 22px;
    }

    .calculator-icon {
        font-size: 28px;
    }

    .price-range {
        font-size: 32px;
    }

    .question-options {
        grid-template-columns: 1fr;
    }

    .option-btn {
        min-height: 80px;
    }
}

@media (max-width: 480px) {
    .gf-calculator {
        padding: 15px;
        margin: 20px 0;
    }

    .calculator-title {
        font-size: 20px;
    }

    .price-range {
        font-size: 28px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 16px;
    }
}
