/* Hotel Carbon Footprint Calculator - Plugin Styles */

.hcc-wrap {
    max-width: 900px;
    margin: 0 auto 2rem auto;
    font-family: inherit;
    font-size: 14px;
    color: #1a1a1a;
    box-sizing: border-box;
}

.hcc-wrap *,
.hcc-wrap *::before,
.hcc-wrap *::after {
    box-sizing: border-box;
}

/* Header */
.hcc-header {
    background: #215A31;
    color: #fff;
    padding: 18px 24px;
    border-radius: 6px 6px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}

.hcc-header-icon {
    font-size: 32px;
    line-height: 1;
}

.hcc-title {
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    border: none !important;
}

.hcc-subtitle {
    font-size: 11px;
    color: #bcdcc6;
    margin: 0;
}

/* Results section */
.hcc-results-section {
    background: #e9f3ec;
    padding: 16px 20px;
    border-left: 1px solid #c3ddc9;
    border-right: 1px solid #c3ddc9;
}

.hcc-section-label {
    background: #2E7D45;
    color: #fff;
    text-align: center;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.hcc-result-card {
    background: #fff;
    border: 1px solid #c3ddc9;
    border-radius: 4px;
    padding: 10px 14px;
}

.hcc-result-label {
    font-size: 14px;
    color: #1d2327;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.hcc-result-value {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.hcc-total-card {
    background: #2E7D45;
    border-radius: 4px;
    padding: 14px;
    text-align: center;
}

.hcc-total-label {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.hcc-total-value {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
}

.hcc-total-sub {
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    margin-top: 4px;
}

/* Step sections */
.hcc-step-section {
    border: 1px solid #c3ddc9;
    border-top: none;
}

.hcc-step-header {
    background: #2E7D45;
    color: #fff;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hcc-step-body {
    padding: 16px 20px;
    background: #fff;
}

.hcc-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Sub-labels */
.hcc-sub-label {
    background: #2E7D45;
    color: #fff;
    text-align: center;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 3px 3px 0 0;
}

/* Helper hint under a sub-label (sits between label and field table) */
.hcc-hint {
    margin: 0;
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1.4;
    color: #4a5a4f;
    background: #f1f8f3;
    border: 1px solid #c3ddc9;
    border-bottom: none;
}

/* Field tables */
.hcc-field-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #c3ddc9;
    border-top: none;
}

.hcc-field-table tr td {
    padding: 6px 10px;
    font-size: 13px;
    border-bottom: 1px solid #e9f3ec;
    vertical-align: middle;
}

.hcc-field-table tr:last-child td {
    border-bottom: none;
}

.hcc-field-table td:first-child {
    color: #555;
    white-space: normal;
    word-break: break-word;
}

.hcc-field-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.hcc-field-table select,
.hcc-field-table input[type="number"] {
    border: 1px solid #c3ddc9;
    border-radius: 3px;
    padding: 5px 8px;
    font-family: inherit;
    font-size: 13px;
    width: 160px;
    max-width: 100%;
    color: #1a1a1a;
}

/* Number inputs read as values, so keep them right-aligned. */
.hcc-field-table input[type="number"] {
    text-align: right;
}

/* Selects must stay left-aligned with room for the native dropdown arrow,
   otherwise the option text overlaps the caret on the right. */
.hcc-field-table select {
    text-align: left;
    padding-right: 24px;
}

.hcc-data-input {
    background: #fffde7 !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

.hcc-field-table select:focus,
.hcc-field-table input:focus {
    outline: 2px solid #2E7D45;
    outline-offset: 1px;
}

/* Reset button */
.hcc-reset-btn {
    background: #2E7D45;
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.3px;
    transition: background 0.15s ease;
}

.hcc-reset-btn:hover {
    background: #215A31;
}

/* Coefficients */
.hcc-coeff-label {
    background: #2E7D45;
    color: #fff;
    text-align: center;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 3px 3px 0 0;
    margin-top: 16px;
}

.hcc-coeff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #c3ddc9;
    border-top: none;
}

.hcc-coeff-row {
    padding: 10px 14px;
}

.hcc-coeff-row:first-child {
    border-right: 1px solid #c3ddc9;
}

.hcc-coeff-title {
    font-size: 11px;
    color: #777;
    margin-bottom: 6px;
}

.hcc-coeff-inner {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.hcc-coeff-key {
    font-size: 12px;
    color: #555;
}

.hcc-coeff-val {
    font-size: 22px;
    font-weight: 700;
    color: #215A31;
}

.hcc-coeff-unit {
    font-size: 11px;
    color: #777;
}

/* Footer */
.hcc-footer-note {
    text-align: center;
    font-size: 11px;
    color: #777;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #c3ddc9;
    border-top: none;
    border-radius: 0 0 6px 6px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 600px) {

    /* Stack all two-column grids */
    .hcc-results-grid,
    .hcc-two-col,
    .hcc-coeff-grid {
        grid-template-columns: 1fr;
    }

    /* Header: tighten up */
    .hcc-header {
        padding: 14px 16px;
        gap: 10px;
    }

    .hcc-header-icon {
        font-size: 24px;
    }

    .hcc-title {
        font-size: 18px !important;
    }

    /* Results */
    .hcc-results-section {
        padding: 12px 14px;
    }

    .hcc-total-value {
        font-size: 20px;
    }

    /* Step body */
    .hcc-step-body {
        padding: 12px 14px;
    }

    /* Field tables: switch to vertical (stacked) layout on mobile */
    .hcc-field-table {
        display: block;
    }

    .hcc-field-table tbody {
        display: block;
    }

    .hcc-field-table tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid #e9f3ec;
        padding: 8px 0;
    }

    .hcc-field-table tr:last-child {
        border-bottom: none;
    }

    .hcc-field-table td {
        display: block;
        padding: 2px 10px;
        border: none !important;
        text-align: left !important;
        white-space: normal;
    }

    .hcc-field-table td:first-child {
        font-size: 11px;
        color: #777;
        font-weight: 600;
        letter-spacing: 0.3px;
        text-transform: uppercase;
    }

    .hcc-field-table td:last-child {
        text-align: left !important;
        padding-top: 4px;
    }

    /* Inputs & selects: full width on mobile */
    .hcc-field-table select,
    .hcc-field-table input[type="number"] {
        width: 100%;
        max-width: 100%;
        text-align: left;
        font-size: 14px;
        padding: 8px 10px;
    }

    .hcc-data-input {
        font-size: 16px !important; /* prevents iOS zoom on focus */
    }

    /* Coefficients */
    .hcc-coeff-row:first-child {
        border-right: none;
        border-bottom: 1px solid #c3ddc9;
    }

    .hcc-coeff-val {
        font-size: 18px;
    }

    /* Reset button: full width */
    .hcc-reset-btn {
        width: 100%;
        text-align: center;
        padding: 10px;
    }
}
