/* Ha55a Exchange — contextual YouTube guide cards. Isolated; disable via config/guide_videos.php */
.gv-card.is-dismissed,
.gv-hint.is-dismissed {
    display: none !important;
}

.custom-widget .gv-card:last-child,
.custom-widget .gv-hint:last-child {
    margin-bottom: 0;
    margin-top: 12px;
}

.custom-widget .gv-card {
    box-shadow: none;
}

.gv-card {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 0 16px;
    background: #fff;
    border: 1px solid #eceef3;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    direction: rtl;
    text-align: right;
}

.gv-card__play {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 44px 10px 12px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: right;
    cursor: pointer;
}

.gv-card__thumb {
    position: relative;
    flex: 0 0 84px;
    width: 84px;
    height: 112px;
    border-radius: 12px;
    overflow: hidden;
    background: #031e4b;
}

.gv-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
    display: block;
    max-width: none;
}

.gv-card__badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(3, 30, 75, 0.05), rgba(3, 30, 75, 0.35));
    color: #fff;
    font-size: 22px;
    pointer-events: none;
}

.gv-card__badge i {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #ff6b31;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 107, 49, 0.45);
}

.gv-card__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    gap: 2px;
}

.gv-card__kicker {
    font-size: 11px;
    font-weight: 700;
    color: #ff6b31;
    letter-spacing: 0.02em;
}

.gv-card__title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
}

.gv-card__cta {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.gv-card__x {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gv-card__x:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.gv-card--compact .gv-card__thumb {
    flex-basis: 72px;
    width: 72px;
    height: 96px;
}

.gv-card--compact .gv-card__title {
    font-size: 14px;
}

.gv-card--compact .gv-card__play {
    padding: 8px 40px 8px 10px;
}

.gv-hint {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 4px;
    padding: 8px 10px 8px 36px;
    border-radius: 12px;
    background: rgba(255, 107, 49, 0.06);
    border: 1px solid rgba(255, 107, 49, 0.16);
    direction: rtl;
}

.gv-hint__play {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-align: right;
    color: inherit;
}

.gv-hint__thumb {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #031e4b;
}

.gv-hint__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}

.gv-hint__title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.gv-hint__cta {
    font-size: 12px;
    color: #ff6b31;
    font-weight: 600;
}

.gv-hint__x {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.gv-section {
    margin-bottom: 40px;
}

.gv-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 16px;
}

.gv-section__head h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.gv-section__head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
}

.gv-section__all {
    font-size: 13px;
    font-weight: 700;
    color: #ff6b31;
    text-decoration: none;
}

.gv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.gv-poster {
    margin: 0;
    border: 1px solid #eceef3;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.gv-poster__play {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    text-align: right;
    color: inherit;
}

.gv-poster__media {
    position: relative;
    aspect-ratio: 9 / 16;
    background: #031e4b;
}

.gv-poster__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.gv-poster__media .gv-card__badge {
    background: linear-gradient(180deg, transparent 40%, rgba(3, 30, 75, 0.45));
}

.gv-poster__title {
    display: block;
    padding: 10px 12px 12px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    color: #0f172a;
}

.gv-modal .modal-content {
    background: #0f1218;
    color: #fff;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
}

.gv-modal .modal-header {
    border: 0;
    padding: 12px 16px 8px;
}

.gv-modal .modal-title {
    font-size: 15px;
    font-weight: 800;
}

.gv-modal .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.gv-modal__frame {
    width: min(380px, 92vw);
    aspect-ratio: 9 / 16;
    max-height: 78vh;
    margin: 0 auto 16px;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.gv-modal__frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (min-width: 768px) {
    .gv-card__thumb {
        flex-basis: 96px;
        width: 96px;
        height: 128px;
    }

    .gv-card__title {
        font-size: 16px;
    }

    .gv-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }

    .gv-poster__title {
        font-size: 14px;
        min-height: 3.2em;
    }
}

@media (min-width: 1200px) {
    .gv-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .gv-card {
        margin-bottom: 12px;
        border-radius: 14px;
    }

    .gv-card__play {
        gap: 10px;
        padding: 8px 38px 8px 10px;
    }

    .gv-card__thumb {
        flex-basis: 64px;
        width: 64px;
        height: 86px;
        border-radius: 10px;
    }

    .gv-card__title {
        font-size: 13.5px;
    }

    .gv-card__cta {
        font-size: 11px;
    }

    .gv-modal__frame {
        width: min(100%, 92vw);
        max-height: 72vh;
    }
}

[data-theme="dark"] .gv-card,
[data-theme="dark"] .gv-poster {
    background: var(--dm-card, #171b24);
    border-color: var(--dm-line, #2a3140);
    box-shadow: none;
}

[data-theme="dark"] .gv-card__title,
[data-theme="dark"] .gv-poster__title,
[data-theme="dark"] .gv-hint__title,
[data-theme="dark"] .gv-section__head h3 {
    color: var(--dm-text, #e8ebf2);
}

[data-theme="dark"] .gv-card__cta,
[data-theme="dark"] .gv-section__head p {
    color: var(--dm-muted, #97a0b0);
}

[data-theme="dark"] .gv-card__x {
    background: #1e2430;
    color: #97a0b0;
}

[data-theme="dark"] .gv-hint {
    background: rgba(255, 107, 49, 0.1);
    border-color: rgba(255, 107, 49, 0.22);
}
