/* ====================================================================
   UTILITY STYLES
   File: css/utilities.css
   Description: Các utility classes và helper styles
   ==================================================================== */

/* ===== Hidden Class ===== */
.sf-hidden {
    display: none !important;
}

/* ===== Append Widget Styles ===== */
.yhy-append-wrap {
    overflow: hidden;
    width: 100%;
    height: 40px;
    padding-top: 10px;
}

.yhy-append {
    display: flex;
    align-items: center;
}

.yhy-append .yhy-append-btn {
    align-items: center;
    margin-right: 5px;
    padding: 5px 8px;
    background: #EC3237;
    box-shadow: 0px -1px 30px rgb(0 0 0 / 15%);
    border-radius: 10px 10px 0px 0px;
    border: 0;
    font-family: "Arial";
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.yhy-append .yhy-append-btn:hover {
    background: #D02A2F;
    transform: translateY(-2px);
    box-shadow: 0px -2px 35px rgb(0 0 0 / 20%);
}

.yhy-append .yhy-append-icon {
    width: 24px;
    height: 24px;
}

.yhy-append .yhy-btn-emc .yhy-append-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFFFFF;
    border-radius: 50%;
}

.yhy-append .yhy-append-txt {
    margin-left: 5px;
    font-size: 14px;
    line-height: 16px;
    color: #FFFFFF;
}

/* ===== Loading Indicator ===== */
.nuxt-loading-indicator {
    position: fixed;
    top: 0px;
    right: 0px;
    left: 0px;
    pointer-events: none;
    width: auto;
    height: 5px;
    opacity: 0;
    background: rgb(238, 140, 0);
    transform: scaleX(0);
    transform-origin: left center 0px;
    transition: transform 0.1s, height 0.4s, opacity 0.4s;
    z-index: 999999;
}

.nuxt-loading-indicator.loading {
    opacity: 1;
    transform: scaleX(0.5);
}

.nuxt-loading-indicator.complete {
    opacity: 0;
    transform: scaleX(1);
}

/* ===== Container Utilities ===== */
.container {
    margin-left: auto;
    margin-right: auto;
    padding-left: 6px;
    padding-right: 6px;
    max-width: 1232px;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===== Placeholder Image ===== */
.placeholder {
    background-color: #f3f4f6;
    position: relative;
}

.placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    animation: placeholder-shimmer 2s infinite;
}

@keyframes placeholder-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* ===== Shadow Custom ===== */
.shadow-custom {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.shadow-custom:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ===== Transition Utilities ===== */
.transition-colors {
    transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.transition-transform {
    transition: transform 0.3s ease;
}

.transition-all {
    transition: all 0.3s ease;
}

/* ===== Hover Effects ===== */
.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* ===== Text Utilities ===== */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== Focus Visible ===== */
.focus-visible:focus-visible {
    outline: 2px solid #BA0C2F;
    outline-offset: 2px;
}

/* ===== Aspect Ratio ===== */
.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* ===== Image Object Fit ===== */
.object-cover {
    object-fit: cover;
}

.object-contain {
    object-fit: contain;
}
/* Khả năng tiếp cận: chữ chỉ cho trình đọc màn hình, link bỏ qua menu, nút tạm dừng chuyển động. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100000; background: #C8102E; color: #fff; padding: 10px 16px; border-radius: 4px; font-weight: 700; }
.skip-link:focus { top: 8px; }
.motion-toggle { float: right; margin-left: 8px; padding: 2px 10px; font-size: 13px; border: 1px solid #C8102E; color: #C8102E; background: #fff; border-radius: 9999px; cursor: pointer; }
.motion-paused .marquee-content { animation-play-state: paused !important; }
[role="button"]:focus-visible, .motion-toggle:focus-visible { outline: 3px solid #f5a623; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .marquee-content { animation-play-state: paused !important; } }
.footer-parent-links a { text-decoration: underline; }
/* Tương phản ≥ 4,5:1 trên nền trắng (WCAG 1.4.3): xám #9e9e9e và #777 của bản gốc không đạt. */
.text-bca-gray-400 { color: #5f6368 !important; }
.mnv-date-hd a, .mnv-date-hd span { color: #5f6368 !important; }
.emc-badge { display: inline-block; margin-right: 10px; padding: 6px 12px; border: 1px solid #fff; border-radius: 6px; font-weight: 700; font-size: 13px; color: #fff; vertical-align: middle; }
