/* RoadshowHub Reports */

.rhr-container *,
.rhr-report-wrapper * {
    box-sizing: border-box;
}

/* === Selector Page === */
.rhr-container {
    width: 60%;
    margin: 0 auto;
}

.rhr-container h3 {
    color: black !important;
}

/* === Report Page === */
.rhr-report-wrapper {
    width: 90%;
    margin: 0 auto;
}

/* === Summary Metric Cards === */
.rhr-metrics-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin: 24px 0;
}

.rhr-metric-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 16px 24px;
    text-align: center;
    min-width: 120px;
    flex: 1 1 120px;
    max-width: 180px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: help;
    position: relative;
}

.rhr-metric-card:hover {
    border-color: #198754;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Custom tooltip that stays visible on hover */
.rhr-metric-card[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    line-height: 1.4;
    width: 220px;
    text-align: left;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
    z-index: 100;
    margin-bottom: 8px;
}

.rhr-metric-card[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

.rhr-metric-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #198754;
}

.rhr-metric-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 4px;
}

.rhr-metric-comparison {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

/* === Chart === */
.rhr-chart-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
}

.rhr-chart-wrapper canvas {
    width: 100% !important;
    height: 400px !important;
}

/* === Viewer Table === */
#rhr-viewer-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#rhr-viewer-section .dataTables_wrapper {
    min-width: 800px;
}

/* === DataTable overrides === */
.dataTables_length select {
    width: 120px !important;
    margin-left: 20px !important;
}

.dataTables_length {
    margin-left: 20px !important;
}

/* === Shared === */
.custom-hr {
    width: 80%;
    height: 2px;
    background-color: lightgray;
    border: none;
    margin: 20px auto;
}

.btn-chiseled {
    background-color: green;
    color: white;
    border: 2px solid #004d00;
    font-weight: bold;
    padding: 8px 16px;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.3),
                inset -2px -2px 5px rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    cursor: pointer;
}

a.btn-chiseled,
a.btn-chiseled:visited,
a.btn-chiseled:hover,
a.btn-chiseled:focus,
a.btn-chiseled:active {
    color: white !important;
    text-decoration: none !important;
}

.btn-chiseled:hover {
    background-color: #006400;
}

/* === Responsive: tablets === */
@media screen and (max-width: 900px) {
    .rhr-container {
        width: 90%;
    }

    .rhr-report-wrapper {
        width: 95%;
    }

    .rhr-metrics-cards {
        gap: 10px;
    }

    .rhr-metric-card {
        min-width: 100px;
        max-width: 150px;
    }

    .rhr-chart-wrapper canvas {
        height: auto !important;
    }
}

/* === Responsive: phones === */
@media screen and (max-width: 480px) {
    .rhr-container {
        width: 95%;
    }

    .rhr-report-wrapper {
        width: 100%;
        padding: 0 10px;
    }

    .rhr-metrics-cards {
        flex-direction: column;
        align-items: center;
    }

    .rhr-metric-card {
        max-width: 100%;
        width: 100%;
    }

    .btn-chiseled {
        width: 100%;
        text-align: center;
    }
}

/* === Print === */
@media print {
    .btn-chiseled,
    .btn,
    .dataTables_wrapper .dt-buttons {
        display: none !important;
    }
}
