/* Inspection Overview - Certified Listing */
.inspection-overview-section {
    margin-bottom: 20px;
}

.inspection-overview-card {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    overflow: visible;
}

.io-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
    padding: 16px 20px;
    border-radius: 14px 14px 0 0;
    color: #fff;
    background-color: #1a6b42;
    background-image:
        linear-gradient(45deg, rgba(255, 255, 255, 0.07) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.07) 75%, rgba(255, 255, 255, 0.07)),
        linear-gradient(45deg, rgba(255, 255, 255, 0.07) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.07) 75%, rgba(255, 255, 255, 0.07)),
        linear-gradient(135deg, #2f9d62 0%, #28a86c 30%, #1f7a4f 65%, #155c3a 100%);
    background-size: 28px 28px, 28px 28px, 100% 100%;
    background-position: 0 0, 14px 14px, 0 0;
}

.io-body {
    padding: 16px 20px 18px;
}

.io-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.io-title-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.io-title {
    color: #fff;
    font-weight: 700;
    font-size: 18px;
}

.io-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.io-info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 14px;
    color: #e2fbe9;
    cursor: pointer;
    outline: none;
    border: none;
    padding: 0;
    background: transparent;
    --io-tooltip-shift: 0px;
}

.io-info-tooltip:focus,
.io-info-tooltip:hover {
    color: #fff;
}

.io-info-tooltip-text {
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    transform: translateX(-50%);
    width: min(420px, calc(100vw - 40px));
    background: rgba(15, 23, 42, 0.96);
    color: #fff;
    border-radius: 8px;
    padding: 9px 10px;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.16s ease;
    z-index: 10000;
}

.io-info-tooltip.is-open .io-info-tooltip-text {
    opacity: 1;
    visibility: visible;
}

.io-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
}

.io-collapse-btn {
    border: none;
    background: #fff;
    color: #155c3a;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.io-collapse-btn:hover {
    background: #f4fbf7;
    color: #0f4d30;
}

.io-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.io-stat-card {
    background: #fff;
    border: 1px solid #edf2f7;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
    padding: 12px 10px;
    text-align: center;
}

.io-stat-value {
    color: #16a34a;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 4px;
}

.io-stat-value.io-stat-period {
    font-size: 18px;
}

.io-stat-label {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.io-month-slider {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.io-month-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    container-type: inline-size;
    container-name: io-month-scroll;
}

.io-month-scroll::-webkit-scrollbar {
    display: none;
}

.io-month-arrow {
    width: 28px;
    height: 28px;
    border: 1px solid #dbe3ee;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    font-size: 12px;
}

.io-month-arrow:hover:not(:disabled) {
    background: #f8fafc;
}

.io-month-arrow:disabled {
    opacity: 0.35;
    cursor: default;
}

.io-month-grid {
    display: flex;
    gap: 12px;
    padding: 2px 4px;
}

.io-month-card {
    flex: 0 0 auto;
    min-width: 108px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Large screens: show at most 6 month cards in the visible area */
@media (min-width: 992px) {
    .io-month-card {
        flex: 0 0 calc((100cqi - (5 * 12px)) / 6);
        min-width: calc((100cqi - (5 * 12px)) / 6);
        padding: 14px 16px;
        border-radius: 12px;
    }

    .io-month-label {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .io-month-count {
        font-size: 12px;
    }

    .io-month-count-value {
        font-size: 24px;
    }
}

.io-month-card:hover,
.io-month-card.is-active {
    border-color: #22c55e;
    background: #f0fdf4;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.15);
}

.io-month-label {
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 4px;
}

.io-month-count {
    color: #64748b;
    font-size: 11px;
}

.io-month-count-value {
    color: #16a34a;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    margin-right: 3px;
}

@media (max-width: 991px) {
    .io-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .io-body {
        padding: 14px;
    }

    .io-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .io-title {
        font-size: 16px;
    }

    .io-title-row {
        flex-wrap: wrap;
        row-gap: 6px;
    }

    .io-info-tooltip {
        width: 16px;
        height: 16px;
        font-size: 13px;
    }

    .io-info-tooltip-text {
        top: calc(100% + 6px);
        left: 50%;
        right: auto;
        transform: translateX(calc(-50% + var(--io-tooltip-shift)));
        width: min(300px, calc(100vw - 24px));
        font-size: 11px;
        margin-top: 0;
    }

    .io-stat-value {
        font-size: 20px;
    }

    .io-stat-value.io-stat-period {
        font-size: 16px;
    }

    .io-month-card {
        min-width: 96px;
    }

    .io-month-count-value {
        font-size: 18px;
    }
}
