/* ============================================= */
/* ACCENT COLOR VARIABLES — override via WP inline style */
/* ============================================= */
.ysb-wrap {
    --ysb-gold:        #ffcc00;
    --ysb-gold-soft:   #fffde6;
    --ysb-gold-border: #d4af37;
    --ysb-gold-hover:  #fde7a8;
    --ysb-gold-text:   #6b5300;
    --ysb-gold-shadow: rgba(212, 175, 55, 0.2);

    width: 100%;
    max-width: 1180px;
    margin: 20px auto;
    border-radius: 14px;
    border: 1px solid #e8e8e8;
    background: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.ysb-head,
.ysb-file-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #ececec;
    background: #ffffff;
}

.ysb-head h3 {
    margin: 0;
    font-size: 18px;
}

.ysb-head span {
    font-size: 13px;
    color: #6b7280;
}

.ysb-current-path {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fcfcfc;
    color: #666;
    font-size: 12px;
    word-break: break-all;
}

.ysb-nav-row {
    padding: 10px 16px 0;
}

.ysb-list {
    max-height: 680px;
    overflow: auto;
    padding: 12px 14px;
}

.ysb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.ysb-folder-link {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    color: #333 !important;
    text-decoration: none;
    text-align: left;
    font-size: 13px;
}

.ysb-open-file {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    background: #fff;
    padding: 10px 12px;
    color: #333 !important;
    text-decoration: none;
    text-align: left;
    font-size: 13px;
}

.ysb-file-left {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.ysb-icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--ysb-gold); /* Yellow icon color */
}

.ysb-open-file {
    cursor: pointer;
}

.ysb-folder-link:hover,
.ysb-open-file:hover {
    border-color: var(--ysb-gold-border);
    background: var(--ysb-gold-soft);
}

.ysb-parent-link {
    font-weight: 600;
}

.ysb-file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ysb-file-ext {
    font-size: 11px;
    color: #666;
    background: #f3f4f6;
    border-radius: 999px;
    padding: 3px 7px;
    flex-shrink: 0;
}

.ysb-download,
.ysb-file-download,
.ysb-back-browser {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ysb-gold-border);
    background: var(--ysb-gold-soft);
    color: var(--ysb-gold-text);
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.ysb-download {
    min-width: 38px;
    padding: 8px 0;
    font-size: 16px;
    line-height: 1;
}

.ysb-download:hover,
.ysb-file-download:hover,
.ysb-back-browser:hover {
    background: var(--ysb-gold-hover);
}

/* Video: khong hien nut tai / mo URL trong header file view */
.ysb-file-download.ysb-file-download--disabled {
    display: none !important;
}

.ysb-file-view {
    min-height: 760px;
}

.ysb-file-title {
    flex: 1;
    font-size: 14px;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ysb-file-stage {
    min-height: 700px;
    background: #0d1117;
    position: relative;
}

/* Chi video: khung 16:9 + vien vang, stage khong keo dai thua */
.ysb-file-stage:has(.ysb-video-shell) {
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 12px 28px;
}

.ysb-frame {
    display: block;
    width: 100%;
    height: 700px;
    border: 0;
    background: #fff;
}

.ysb-video-shell {
    /* inherit from .ysb-wrap */
    width: 100%;
    max-width: 1120px;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    box-sizing: border-box;
    border-radius: 14px;
    background: #000;
    overflow: hidden;
}

.ysb-video-shell-inner {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
}

.ysb-video-shell video,
.ysb-video-shell .plyr {
    width: 100%;
    height: 100%;
}

/* Plyr accent vang (khop theme nut LMS) */
.ysb-video-shell .plyr--full-ui {
    --plyr-color-main: var(--ysb-gold);
    --plyr-video-controls-background: linear-gradient(rgba(0, 0, 0, 0), rgba(26, 22, 10, 0.92));
}

.ysb-video-shell .plyr__control--overlaid {
    background: var(--ysb-gold);
    color: #1a1508;
}

.ysb-video-shell .plyr__control--overlaid:hover {
    background: var(--ysb-gold-soft);
    color: #3d3200;
}

.ysb-video-shell .plyr__control.plyr__tab-focus,
.ysb-video-shell .plyr__control:hover,
.ysb-video-shell .plyr__control[aria-expanded='true'] {
    background: var(--ysb-gold-shadow);
    color: var(--ysb-gold-soft);
}

.ysb-video-shell .plyr__progress__buffer {
    color: var(--ysb-gold-border);
}

.ysb-empty,
.ysb-unsupported {
    padding: 30px 16px;
    text-align: center;
    color: #666;
}

@media (max-width: 991px) {
    .ysb-list {
        max-height: 520px;
    }

    .ysb-file-view,
    .ysb-file-stage:not(:has(.ysb-video-shell)),
    .ysb-frame {
        min-height: 560px;
        height: 560px;
    }

    .ysb-file-stage:has(.ysb-video-shell) {
        height: auto;
        min-height: 0;
    }

    .ysb-file-head {
        flex-wrap: wrap;
    }

    .ysb-file-title {
        min-width: 100%;
    }
}

/* ============================================= */
/* LAYOUT: VIDEO-BELOW */
/* ============================================= */
.ysb-wrap.ysb-layout-video-below {
    display: flex;
    flex-direction: column-reverse; /* Browser list below File stage */
}

.ysb-wrap.ysb-layout-video-below .ysb-file-view,
.ysb-wrap.ysb-layout-video-below .ysb-browser-view {
    display: block !important;
}

.ysb-wrap.ysb-layout-video-below .ysb-file-view {
    min-height: 0;
}

.ysb-wrap.ysb-layout-video-below .ysb-file-stage {
    background: transparent !important;
    padding: 0 !important;
    min-height: 0 !important;
}

.ysb-wrap.ysb-layout-video-below .ysb-video-shell {
    max-width: 100% !important;
    border-radius: 0 !important;
}

.ysb-wrap.ysb-layout-video-below .ysb-video-shell-inner {
    border-radius: 0 !important;
}

.ysb-wrap.ysb-layout-video-below .ysb-file-head {
    display: none !important;
}

.ysb-wrap.ysb-layout-video-below .ysb-list {
    max-height: 400px;
    overflow-y: auto;
}

.ysb-wrap.ysb-layout-video-below .ysb-row-file.active .ysb-open-file {
    border-color: var(--ysb-gold);
    background: var(--ysb-gold-soft);
    box-shadow: 0 4px 10px var(--ysb-gold-shadow);
}
