/* ====================================================================
   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;
}