/**
 * Keiste Solar Analysis - Main Stylesheet
 * Version: 1.1.3
 */

/* ===== Design System Variables ===== */
:root {
    /* Colors */
    --primary-color: #2a9d8f;
    --secondary-color: #264653;
    --accent-color: #e76f51;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    
    /* Text colors */
    --text-color: #333333;
    --text-light: #6c757d;
    --text-dark: #212529;
    
    /* Background colors */
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --bg-section: #2a9d8f;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Border radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* Typography */
    --font-family: 'Open Sans', sans-serif;
    --font-script: 'Bad Script', cursive;
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --line-height: 1.6;
}

/* Keiste.com inspired branding for Solar Analysis Plugin */
:root {
    --primary-green: #2a9d8f;
    --accent-yellow: #ffd600;
    --dark-blue: #264653;
    --light-green: #e9f5f2;
    --text-color: #222;
    --background: #f5fafd;
    --border-radius: 10px;
}

body,
.container,
.pdf-page {
    font-family: var(--font-family);
    color: var(--text-color);
    padding-bottom: 3rem;
}

h1,
h2,
h3,
h4,
h5,
.ksrad-wrapper h6 {
    font-family: 'Google Sans', sans-serif, var(--font-family);
    color: var(--dark-blue);
    font-weight: 700;
}

.ksrad-wrapper .btn,
.ksrad-wrapper .btn-primary {
    background: var(--primary-green);
    color: #fff;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 8px rgba(42, 157, 143, 0.08);
    transition: background 0.2s;
}

#netIncome {
    width: 200px;
    text-align: center;
    font-size: 2rem !important;
}

.fa-exchange-alt {
    font-size: 2rem !important;
}

.bad-script-regular {
  font-family: "Bad Script", cursive;
  font-weight: 400;
  font-style: normal;
}

.btn:hover,
.btn-primary:hover {
    background: var(--dark-blue);
    color: #fff;
}

.form-label-left {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
    text-align: right;
    width: 300px;
    max-width: 85%;
}

.form-label-right {
    font-weight: 600;
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
    text-align: left;
    width: 300px;
    max-width: 85%;
}

input,
select,
textarea,
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid var(--primary-green);
    font-family: var(--font-family);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-yellow);
    outline: none;
}

.input-help-right {
    font-size: 0.85em;
    color: var(--dark-blue);
    margin-top: 0.25rem;
    text-align: right;
}

.input-help-left {
    font-size: 0.85em;
    color: var(--dark-blue);
    margin-top: 0.25rem;
    text-align: right;
}

.section,
.results-section,
.pdf-page {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 12px rgba(38, 70, 83, 0.06);
}

.highlight,
.grant-display,
.installation-cost-display {
    color: var(--primary-green);
    font-weight: 700;
}

.underWrite {
    color: var(--dark-blue);
    font-size: 0.95em;
    font-weight: 500;
}

input[type=range].custom-slider {
    background: var(--light-green);
}

input[type=range].custom-slider::-webkit-slider-thumb {
    background: var(--accent-yellow);
}

input[type=range].custom-slider::-moz-range-thumb {
    background: var(--accent-yellow);
}


/* ===== Base Styles ===== */
.ksrad-wrapper {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: var(--line-height);
}

.ksrad-wrapper .container {
    margin: 0 auto;
    max-width: 650px;
    padding: 0 var(--spacing-md);
}

.middle-column {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

/* ===== Section Styles ===== */
.section {
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-xl);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.section h2,
.section h4 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-lg);
}

/* PDF-specific sections */
.pdf-page {
    page-break-inside: avoid;
    page-break-after: always;
}

/* ===== Heading Styles ===== */
.roi-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent !important;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #666 !important;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 1000;
}

.roi-modal-close:hover {
    color: #222;
}

.roi-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 0.5rem 0.5rem 0.5rem 0.5rem;
    min-width: 270px;
    max-width: 350px;
    margin: 0 auto;
}

.roi-modal-title {
    text-align: center;
    color: var(--primary-green, #2a9d8f);
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.roi-form-group {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
}

.roi-input {
    border-radius: 8px;
    border: 1px solid var(--primary-green, #2a9d8f);
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #f5fafd;
    color: #222;
    transition: border 0.2s;
}

.roi-input:focus {
    border-color: var(--accent-yellow, #ffd600);
    outline: none;
    background: #fff;
}

.required {
    color: var(--primary-green, #2a9d8f);
    font-weight: 700;
    margin-left: 0.2em;
}

.optional {
    color: #888;
    font-size: 0.95em;
    font-weight: 400;
}

.roi-gdpr-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.2rem;
}

.roi-gdpr-label {
    font-size: 0.98em;
    color: var(--dark-blue, #264653);
    font-weight: 500;
    margin: 0;
}

.roi-gdpr-label a {
    color: var(--primary-green, #2a9d8f);
    text-decoration: underline;
}

.roi-gdpr-label a:hover {
    color: var(--accent-yellow, #ffd600);
}

.roi-disclaimer {
    margin-top: 0.2rem;
    text-align: left;
}

.roi-disclaimer-text {
    font-size: 0.93em;
    color: #888;
    font-style: italic;
}

.roi-modal-menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 0.5rem;
}

.roi-btn {
    border-radius: 8px;
    border: none;
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.roi-btn-cancel {
    background: #eee;
    color: #222;
}

.roi-btn-cancel:hover {
    background: #ddd;
}

.roi-btn-submit {
    background: var(--primary-green, #2a9d8f);
    color: #fff;
}

.roi-btn-submit:hover {
    background: var(--accent-yellow, #ffd600);
    color: var(--dark-blue, #264653);
}
        
/* ===== Form Styles ===== */
.form-label-left,
.form-label-right {
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.form-control {
    padding: 0.35rem 0.6rem;
    border: 1px solid #ced4da;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(42, 157, 143, 0.25);
}

.input-help-left {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin-top: var(--spacing-xs);
    text-align: right;
}

.input-help-right {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    margin-top: var(--spacing-xs);
    text-align: left;
}

/* Energy display boxes */
.energy-display-left,
.energy-display-right {
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 2px solid var(--primary-color);
    font-weight: 600;
    text-align: center;
}

input[type="number"] {
    -webkit-appearance: none;
    text-align: center;
}

/* ===== Button Styles ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #238276;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-link {
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
}

/* ===== Installation Details Grid ===== */
.install-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.install-details-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
}

.install-details-cell {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.1rem 1rem 0.7rem 1rem;
}

.install-details-border {
    border-left: 1px solid #bbb;
}

/* ===== Overview Grid ===== */
.overview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 0.5rem;
}

.overview-item {
    flex: 1 1 220px;
    max-width: 320px;
    background: transparent;
    padding: 0.5rem 0.75rem;
}

.overview-item h6 {
    margin: 0 0 0.35rem 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.overview-item .value {
    font-size: 1rem;
    color: var(--text-color);
}

.financial-form {
    padding: 2rem 0;
}

/* ===== Panel Config Styles ===== */
.panel-config {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.panel-config h3 {
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--bg-light);
}

.data-label {
    font-weight: 600;
    color: var(--text-dark);
}

.display-grant {
    color: var(--success-color);
    font-weight: 600;
}

/* ===== Table Styles ===== */
.table {
    width: 100%;
    margin-bottom: var(--spacing-md);
    color: var(--text-color);
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    background: var(--bg-light);
    font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* ===== Chart Container ===== */
.chart-container {
    position: relative;
    width: 100%;
    min-height: 200px;
    max-width: 800px;
    margin: var(--spacing-lg) 0;
    overflow: hidden;
    background: transparent;
}

/* ===== Toggle Switches ===== */
.form-check {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0;
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    user-select: none;
}

/* ===== Modal Styles ===== */
.modal-content {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--primary-color);
    color: white;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}

.modal-body {
    padding: var(--spacing-xl);
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: var(--spacing-md) var(--spacing-xl);
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-light) !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

/* ===== Responsive Design ===== */
@media (max-width: 650px) {
    .install-details-row {
        flex-direction: column;
    }

    .grant-box {
        text-align: center !important;
    }

    input[type="number"] {
        -webkit-appearance: none;
        padding-left: unset !important;  
        text-align: center !important;
    }

    .install-details-border {
        border-left: none;
    }

    .form-control {
        width: 200px !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    #electricityBill {
        width: 150px !important;
    }

    .energy-display-left,
    .energy-display-right {
        width: 200px !important;
        margin: 0.4rem 0 !important;
        padding: 0.5rem 0.75rem !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    .form-label-left,
    .form-label-right {
        width: auto !important;
        max-width: 100% !important;
        text-align: center !important;
        display: block !important;
        margin-bottom: 0.35rem !important;
    }

    .input-help-left,
    .input-help-right {
        text-align: center !important;
        margin-bottom: 0.5rem !important;
    }

    .install-details-cell {
        padding: 2.6rem 0.6rem !important;
    }

    .chart-container {
        height: 300px;
    }
}

@media (max-width: 600px) {
    .overview-item {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .section {
        padding: var(--spacing-md);
    }

    .middle-column {
        padding: var(--spacing-md);
    }
}

/* ===== Print Styles ===== */
@media print {
    .nopdf {
        display: none !important;
    }

    .section {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .pdf-page {
        page-break-after: always;
    }
}

/* ===== Additional Component Styles ===== */

/* FontAwesome icon style */
.fas {
    color: var(--primary-green);
    font-size: 2.2rem;
    display: inline-block;
    text-align: center;
    margin-right: 0.5rem;
}

/* Results column style */
.resultsCol {
    max-width: 66%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Highlighted value style */
.highlight {
    color: var(--primary-green);
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0 auto;
    text-align: center;
}

/* Underline/description style */
.underWrite {
    color: var(--dark-blue);
    font-size: 0.95em;
    font-weight: 500;
    width: 200px;
    text-align: center;
}

#netIncome .underWrite {
    text-align: center;
}

/* Flex row for icon and result columns */
.colFlex {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    margin: 1rem 0;
}

.colFlex>.resultsCol {
    border-left: 1px solid var(--primary-green);
    border-right: 1px solid var(--primary-green);
    padding: 0;
    margin: 0;
}

.colFlex>.resultsCol:first-child {
    border-left: none;
}

.colFlex>.resultsCol:last-child {
    border-right: none;
}

/* Flex row for icon and result columns */
.colFlexLeft {
    display: flex;
    align-items: center;
    margin: 1rem;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: left;
}

/* Flex row for icon and result columns */
.colFlexRight {
    display: flex;
    align-items: center;
    margin: 1rem;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center
}

/* Ensure icon and text align vertically with a fixed icon width */
.colFlex, .colFlexLeft, .colFlexRight {
    gap: 0.2rem;
}

.colFlex i.fas, .colFlexLeft i.fas, .colFlexRight i.fas {
    flex: 0 0 56px; /* fixed icon slot */
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0;
}

/* Make the textual column take remaining space and align vertically */
.resultsCol {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    width: calc(100% - 72px);
    box-sizing: border-box;
}

.resultsCol .highlight {
    text-align: center;
    width: 200px;
}

.resultsCol .underWrite {
    text-align: center;
    margin-top: 0.25rem;
}

.downloadLink {
    color: var(--primary-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.downloadLink:hover {
    color: var(--accent-yellow);
}

.chart-container {
    background: var(--light-green);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 6px rgba(42, 157, 143, 0.07);
}

.energy-display-left {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--accent-yellow);
    color: var(--primary-green);
    border-radius: var(--border-radius);
    text-align: right;
    margin-left: auto;
    margin-right: 1.7rem;
    padding: 0.3rem;
    padding-right: 3rem;
    width: 200px;
}

.energy-display-right {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--accent-yellow);
    color: var(--primary-green);
    border-radius: var(--border-radius);
    margin-right: auto;
    padding: 0.3rem;
    margin-left: 1rem;
    width: 200px;
    padding-left: 3rem;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: var(--border-radius);
}

::-webkit-scrollbar {
    background: var(--light-green);
}

/* ROI Results Layout (matches provided image) */
.results-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.roi-main-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
}

.roi-main-value {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.roi-main-label {
    text-align: center;
    font-size: 1.1rem;
    color: var(--dark-blue);
    font-weight: 500;
}

.roi-columns-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    max-width: 600px;
}

.roi-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 2rem;
}

.roi-divider {
    width: 1px;
    background: var(--primary-green);
    min-height: 180px;
    margin: 0 0.5rem;
    align-self: stretch;
}

/* Mobile responsive tweaks for ROI results */
@media (max-width: 768px) {

    /* Stack icon+value vertically for better mobile alignment */
    .colFlex,
    .colFlexLeft,
    .colFlexRight {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 2.4rem 0 !important;
        gap: 0.35rem;
        font-size: xx-large;
    }

    .colFlex i.fas,
    .colFlexLeft i.fas,
    .colFlexRight i.fas {
        margin-bottom: -1.5rem !important;
    }

    /* Center align electricity bill column */
    .elecbill {
        text-align: center !important;
        border-right: none !important;
        padding-right: 0 !important;
    }

    /* Remove dividing borders in stacked layout and reduce padding */
    .colFlex>.resultsCol {
        border-left: none !important;
        border-right: none !important;
        padding: 0.5rem 0.75rem !important;
    }

    /* Make result columns full width and center text */
    .resultsCol {
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin: 0.25rem 0 !important;
    }

    /* Slightly larger highlight for readability on small devices */
    .highlight {
        font-size: 1.4rem !important;
    }

    /* Reduce icon size and move it above values */
    .fas {
        font-size: 1.6rem !important;
        display: block !important;
        margin: 0 0 0.35rem 0 !important;
    }

    #netIncome {
        width: 150px;
        text-align: center !important;
    }

    /* Make the ROI columns stack vertically and remove divider */
    .roi-columns-row {
        flex-direction: column !important;
        align-items: center !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    .roi-divider {
        display: none !important;
    }

    /* Remove any column right/left borders added inline (desktop styles) when stacked on mobile */
    .results-section .col-md-6,
    .results-section .col-md-6[style] {
        border-right: none !important;
        border-left: none !important;
    }

    .form-control {
        text-align: center !important;
    }

    /* Tighter spacing for labels */
    .underWrite {
        font-size: 0.92rem !important;
    }

    #netIncome .underWrite {
        text-align: center !important;
    }

    .results-section {
        padding: 1rem !important;
    }

    .roi-main-value {
        font-size: 1.6rem !important;
    }
}

.logo-image:hover {
    transform: scale(1.05);
}

.place-autocomplete-element-place-name {
    text-align: left !important;
}

.place-autocomplete-element-text-div {
    text-align: left !important;
}

.place-autocomplete-element-row .place-autocomplete-element-text-div {
    text-align: left !important;
}

.map-section {
    text-align: center;
    margin-bottom: 2rem;
    background-color: unset;
}

/* Google Maps autocomplete dropdown items */
.pac-container,
.pac-item,
.pac-item span {
    text-align: left !important;
}

.pac-item {
    padding: 8px !important;
}

.header-image {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 2rem;
    border: 4px solid white;
}

/* Table Styling */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: var(--primary-green);
    color: white;
    font-weight: 600;
    padding: 1.25rem 1rem;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
}

.table td {
    padding: 1.25rem 1rem;
    background: white;
    font-size: 0.95rem;
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: var(--background);
    transition: all 0.2s ease;
}

.site-overview {
    margin: 0 auto;
}

.middle-column {
    max-width: 400px;
    margin: 0 auto;
}

.table {
    box-shadow: var(--input-shadow);
    margin: 1.5rem 0;
}

/* Custom Collapse Button */
.btn-link {
    color: var(--secondary-green);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-link:hover {
    color: var(--primary-green);
}

.btn-link small {
    font-weight: normal;
    opacity: 0.7;
}

/* Google Maps and Autocomplete Styles */
#map {
    height: 100%;
    margin-bottom: 3rem;
}

html,
.ksrad-wrapper {
    min-height: 100%;
    padding: 0;
    text-align: center;
}

.ksrad-wrapper #place-autocomplete-card {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    margin: 10px;
    padding: 5px;
    font-family: Roboto, sans-serif;
    font-size: large;
    font-weight: bold;
}

gmp-place-autocomplete {
    width: 450px;
    max-width: 95%;
}

/* Ensure autocomplete input has proper contrast on mobile */
gmp-place-autocomplete input,
#pacInput {
    background-color: #ffffff !important;
    color: #222222 !important;
    -webkit-text-fill-color: #222222 !important;
    -webkit-opacity: 1 !important;
}

/* Override any browser autofill styles */
gmp-place-autocomplete input:-webkit-autofill,
#pacInput:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
    -webkit-text-fill-color: #222222 !important;
}

#infowindow-content .title {
    font-weight: bold;
}

#map #infowindow-content {
    display: inline;
}

#map {
    height: 50vh;
    margin-bottom: 3rem;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
    display: none;
    border: 2px solid var(--light-green);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    backdrop-filter: blur(5px);
}

#pacContainer {
    text-align: left;
    margin-bottom: 20px;
    min-width: 280px;
    width: 65%;
    padding-right: 20px;
    margin-left: auto;
    margin-right: auto;
}

#reportHeader {
    margin-top: 1.5rem;
}

.form-control {
    width: 200px;
    text-align: left;
    margin-right: auto;
    margin-left: 1.5rem;
}

.form-label {
    text-align: center;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(27, 77, 62, 0.25);
    border-color: var(--primary-green);
}

.social-share-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    color: white;
    text-decoration: none;
}

.social-btn i {
    font-size: 18px;
}

.social-btn.facebook {
    background: #4A8FC7;
}

.social-btn.facebook:hover {
    background: #3d7db3;
}

.social-btn.twitter {
    background: #52B8D8;
}

.social-btn.twitter:hover {
    background: #42a3c4;
}

.social-btn.instagram {
    background: linear-gradient(135deg, #E85D9A 0%, #D946A3 50%, #B537B5 100%);
}

.social-btn.instagram:hover {
    background: linear-gradient(135deg, #d54e8a 0%, #c43993 50%, #a22fa5 100%);
}

.social-btn.tiktok {
    background: #2A2A2A;
}

.social-btn.tiktok:hover {
    background: #1a1a1a;
}

.social-btn.linkedin {
    background: #0077B5;
}

.social-btn.linkedin:hover {
    background: #006399;
}

.social-btn.email {
    background: #7A8F4A;
}

.social-btn.email:hover {
    background: #687a3d;
}

@media (max-width: 480px) {
    .social-btn {
        width: 36px;
        height: 36px;
    }
    
    .social-btn i {
        font-size: 16px;
    }
}

/* Location Form Styles */
.location-form-wrapper .form-select {
    cursor: pointer;
    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='%233A3A38' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    min-width: 280px;
    width: 65%;
    margin-left: auto;
    margin-right: auto;
}

.location-form-wrapper .form-select:focus {
    outline: none;
    border-color: #5CB8B2;
    box-shadow: 0 0 0 3px rgba(92, 184, 178, 0.1);
}

.location-form-wrapper .form-label .required,
.location-form-wrapper span[style*="color: #dc3545"] {
    color: #dc3545;
    font-weight: bold;
}

/* slider css */
.slider-container {
    position: relative;
}

.custom-slider {
    -webkit-appearance: none;   
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--light-green);
    outline: none;
    margin: 1rem 0;
}

.custom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-yellow);
    cursor: pointer;
    border: 2px solid var(--light-yellow);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.custom-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-yellow);
    cursor: pointer;
    border: 2px solid var(--light-yellow);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.custom-slider::-webkit-slider-thumb:hover {
    background: var(--light-yellow);
    transform: scale(1.1);
}

.custom-slider::-moz-range-thumb:hover {
    background: var(--light-yellow);
    transform: scale(1.1);
}

.downloadLink {
    color: var(--primary-green);
    margin: 1rem auto;
    display: block;
    text-transform: uppercase;
    text-decoration: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 12px;
    margin-top: 0.5rem;
    color: var(--text-color);
    font-size: 0.85rem;
}

.input-help {
    margin-top: 0.25rem;
    color: var(--text-color);
    text-align: center;
    font-style: italic;
    font-size: 0.85rem;
}

#panelCountValue,
#systemSizeValue {
    color: var(--primary-green);
    font-weight: 600;
    font-size: 1.1em;
}

.system-size {
    color: var(--text-color);
    font-size: 0.95rem;
}

/* slider info css */
.tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: #5CB8B2;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: 4px;
    font-style: normal;
}

.tooltip-icon:hover {
    background: #4ca8a3;
}

/* report grid css */
.install-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 0 auto;
}

.install-details-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
}

.install-details-cell {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.6rem 0.6rem 0.4rem 0.6rem !important;
}

.install-details-border {
    border-left: 1px solid #bbb;
}

@media (max-width: 900px) {
    .install-details-row {
        flex-direction: column;
    }

    .install-details-border {
        border-left: none;
    }

    /* Mobile-specific adjustments to make inputs and displays full-width */
    .form-control {
        width: 200px !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    #electricityBill {
        width: 150px !important;
    }

    .energy-display-left,
    .energy-display-right {
        width: 200px !important;
        margin: 0.4rem 0 !important;
        padding: 0.5rem 0.75rem !important;
        box-sizing: border-box !important;
        text-align: center !important;
    }

    .form-label-left,
    .form-label-right {
        width: auto !important;
        max-width: 100% !important;
        text-align: center !important;
        display: block !important;
        margin-bottom: 0.35rem !important;
    }

    .input-help-left,
    .input-help-right {
        text-align: center !important;
        margin-bottom: 0.5rem !important;
    }

    .install-details-cell {
        padding: 0.6rem 0.6rem 0.4rem 0.6rem !important;
    }
}

/* overview item */
.overview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: stretch;
    margin-bottom: 0.5rem;
}

.overview-item {
    flex: 1 1 220px;
    max-width: 320px;
    background: transparent;
    padding: 0.5rem 0.75rem;
}

.overview-item h6 {
    margin: 0 0 0.35rem 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.overview-item .value {
    font-size: 1rem;
    color: var(--text-color);
}

@media (max-width: 600px) {
    .overview-item {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* api loader */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#ajaxLoader[style*="display: flex"] {
    display: flex !important;
}
