/*
 * Reading Time Estimator 2024 — Frontend Badge Styles
 * File: assets/reading-time.css
 * Prefix: rte2024-
 */

/* -------------------------------------------------------------------------
   Badge Container
   ------------------------------------------------------------------------- */
.rte2024-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    margin: 0 0 1.25em 0;
    padding: 0.5em 1em;
    background-color: #f0f4f8;
    border-left: 4px solid #2271b1;
    border-radius: 3px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: #3c434a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* When badge appears after content */
.rte2024-badge:last-child {
    margin: 1.25em 0 0 0;
}

/* Hover state for a subtle interactive feel */
.rte2024-badge:hover {
    background-color: #e6edf5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* -------------------------------------------------------------------------
   Icon
   ------------------------------------------------------------------------- */
.rte2024-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    line-height: 1;
    flex-shrink: 0;
    /* Prevent emoji from being too large on some systems */
    font-style: normal;
}

/* -------------------------------------------------------------------------
   Label Text
   ------------------------------------------------------------------------- */
.rte2024-label {
    display: inline-block;
    letter-spacing: 0.01em;
    color: inherit;
    white-space: nowrap;
}

/* -------------------------------------------------------------------------
   Dark Mode Support
   ------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
    .rte2024-badge {
        background-color: #1e2a35;
        border-left-color: #72aee6;
        color: #c9d1d9;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .rte2024-badge:hover {
        background-color: #253040;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }
}

/* -------------------------------------------------------------------------
   WordPress Admin Color Scheme Awareness (frontend via CSS custom properties)
   ------------------------------------------------------------------------- */
@supports (color: var(--wp-admin-theme-color)) {
    .rte2024-badge {
        border-left-color: var(--wp-admin-theme-color, #2271b1);
    }
}

/* -------------------------------------------------------------------------
   Responsive — Small Screens
   ------------------------------------------------------------------------- */
@media screen and (max-width: 600px) {
    .rte2024-badge {
        font-size: 0.8125rem;
        padding: 0.45em 0.85em;
        gap: 0.4em;
    }
}

/* -------------------------------------------------------------------------
   Print — Hide the badge when printing
   ------------------------------------------------------------------------- */
@media print {
    .rte2024-badge {
        display: none;
    }
}