/* --- UTILITY CLASSES --- */

/* Clock Icon (from base.css/styles.css) */
.clock-icon {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 0.5rem;
    color: var(--text-color);
}

/* Visually-hidden helper for accessibility (from components.css) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* MPA Rating Badge - mirroring modal styling (from base.css) */
.mpa-rating-badge {
    display: inline-block;
    padding: 2px 5px;
    margin-left: 10px;
    border: 1px solid var(--text-color);
    border-radius: 3px;
    font-size: 0.9em;
    font-weight: bold;
    color: var(--text-color) !important;
    white-space: nowrap;
    vertical-align: middle;
    position: relative;
    cursor: help;
}

/* Rating description tooltip */
.mpa-rating-badge:hover::after {
    content: attr(data-description);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: normal;
    white-space: normal;
    width: 200px;
    text-align: center;
    z-index: 10000;
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.mpa-rating-badge:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.9) transparent transparent transparent;
    z-index: 10000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

/* User requirement: Hide tooltip content if the data-description attribute is empty (e.g., for NR ratings) */
.mpa-rating-badge[data-description=""]:hover::after,
.mpa-rating-badge[data-description=""]:hover::before {
    content: none !important;
    display: none !important; 
    pointer-events: none !important;
}

/* Ensure the tooltip is visible in light themes */
[data-theme^="light"] .mpa-rating-badge:hover::after {
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

[data-theme^="light"] .mpa-rating-badge:hover::before {
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

/* Ensure the border and text are visible in light themes */
[data-theme^="light"] .mpa-rating-badge {
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* Ensure text color is inherited properly when inside the p tag, even with the light theme text color override logic */
[data-theme^="light"] .modal-content .mpa-rating-badge {
    color: #ffffff !important;
    border-color: #ffffff !important;
}