/* Compatibility styles, do not replace original theme styles */
#header .vlxx-text-logo{display:inline-block;font-weight:700;font-size:37px;line-height:1.25;color:#f3f3f3;text-decoration:none;letter-spacing:1px}
#header a.logo:hover .vlxx-text-logo{color:#f3f3f3}
.vlxx-epm-search{margin:15px 0 18px}.vlxx-epm-results>li{margin:0;padding:9px 12px;border-bottom:1px solid #e5e5e5;background:#fff}
.vlxx-epm-results>li:nth-child(2n){background:#f6f7f7}.vlxx-epm-results small{margin-left:9px;color:#646970}
@media(max-width:767px){#header .vlxx-text-logo{font-size:29px}}

.halim-movie-tile{display:block;margin:8px 0 18px;color:#e8e8e8}.halim-movie-tile img{width:100%;aspect-ratio:2/3;object-fit:cover;border-radius:3px}.halim-movie-tile span{display:block;font-size:13px;margin-top:7px;line-height:1.4}

/* Screenshot-accurate compact episode buttons in original Single Template 2. */
.server-info #halim-list-server.vlxx-compact-episode-list { display:flex; flex-wrap:wrap; align-items:center; gap:5px; }
.server-info .vlxx-compact-server { display:inline-flex; align-items:center; gap:5px; margin:0; }
.server-info .vlxx-compact-server .halim-list-eps { margin:0; padding:0; display:flex; flex-wrap:wrap; gap:5px; }
.server-info #halim-list-server .vlxx-compact-server li { margin:0; padding:0; }
.server-info #halim-list-server .vlxx-compact-server li span { display:inline-block; padding:6px 9px; font-size:13px; border-radius:3px; line-height:17px; background:#2b2b2b; }
.server-info #halim-list-server .vlxx-compact-server li span.active { background:#ea4335; }
.server-info #halim-list-server .vlxx-compact-server li:hover span { background:#ea4335; }
.server-info .vlxx-server-heading { color:#ddd; font-size:12px; margin-right:4px; }
.server-info .vlxx-no-episodes { color:#aaa; font-size:13px; }
/* Keep player squarely aligned with the original full-width watch layout. */
#halim-xxx-widget-search #halim-player-wrapper { width:100%; max-width:100%; }

/* Centered play overlay for proxy/HLS sources: matches the pre-play look in the reference. */
.vlxx-proxy-player{position:relative;width:100%;height:100%;min-height:350px;background:#000;overflow:hidden}
.vlxx-proxy-player .vlxx-proxy-video{display:block;width:100%;height:100%;background:#000}
.vlxx-proxy-player .vlxx-proxy-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border:0;background:transparent;padding:16px;cursor:pointer;z-index:3;display:flex;align-items:center;justify-content:center}
.vlxx-proxy-player .vlxx-proxy-play span{display:block;width:0;height:0;border-top:33px solid transparent;border-bottom:33px solid transparent;border-left:59px solid #d5d5d5;filter:drop-shadow(0 1px 2px rgba(0,0,0,.4))}
.vlxx-proxy-player .vlxx-proxy-play:hover span{border-left-color:#fff}
.vlxx-proxy-player .vlxx-proxy-play[hidden]{display:none}
@media(max-width:767px){.vlxx-proxy-player{min-height:230px}.vlxx-proxy-player .vlxx-proxy-play span{border-top-width:26px;border-bottom-width:26px;border-left-width:46px}}


/* V5: player height and toolbar -- restrict to the original Template 2 only.
   A max-height on the outer element alone does not constrain an embedded video,
   iframe, proxy player or JW Player, which can overlap the episode controls.
*/
#halim-xxx-widget-search .halim_box {
    min-width: 0;
}
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame {
    --vlxx-player-limit: 450px;
    position: relative;
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    height: min(56.25vw, var(--vlxx-player-limit)) !important;
    min-height: 0 !important;
    max-height: var(--vlxx-player-limit) !important;
    overflow: hidden !important;
    margin: 5px 0 6px !important;
    background: #000;
}
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame > #ajax-player,
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame > #halim-player-loader {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    box-sizing: border-box;
}
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame #ajax-player > iframe,
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame #ajax-player > video,
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame #ajax-player > .jwplayer,
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame #ajax-player > .vlxx-proxy-player,
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame #ajax-player > .embed-responsive {
    display: block;
    box-sizing: border-box;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    aspect-ratio: auto;
    padding-bottom: 0 !important;
}
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame #ajax-player video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
/* Ensure injected players/iframe that create their own inner wrapper stay in frame. */
#halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame #ajax-player iframe {
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Toolbar immediately below player. Do not rely on the old fixed 35px box. */
.button-watch.vlxx-player-toolbar {
    position: relative;
    z-index: 2;
    display: flex;
    flex-flow: row wrap;
    align-items: flex-start;
    gap: 6px 0;
    clear: both;
    width: 100%;
    height: auto !important;
    min-height: 35px;
    margin: 0 0 7px;
    padding: 0;
    overflow: visible;
}
.button-watch.vlxx-player-toolbar > .col-xs-5,
.button-watch.vlxx-player-toolbar > .col-xs-7 {
    float: none;
    min-width: 0;
}
.button-watch.vlxx-player-toolbar .server-info {
    display: block;
    min-height: 29px;
}
.button-watch.vlxx-player-toolbar .action-movie {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    justify-content: flex-end;
    float: none;
    width: 100%;
    text-align: right;
    padding: 0;
    margin: 0;
}
.button-watch.vlxx-player-toolbar .action-movie > div {
    display: inline-flex;
    margin: 0;
}
.button-watch.vlxx-player-toolbar + .col-xs-12 {
    float: none;
    clear: both;
}
@media (max-width: 767px) {
    #halim-xxx-widget-search #halim-player-wrapper.vlxx-player-frame {
        --vlxx-player-limit: 450px;
        height: 56.25vw !important;
        max-height: var(--vlxx-player-limit) !important;
    }
    .button-watch.vlxx-player-toolbar > .col-xs-5,
    .button-watch.vlxx-player-toolbar > .col-xs-7 {
        width: 100%;
    }
    .button-watch.vlxx-player-toolbar .action-movie {
        justify-content: flex-start;
    }
}


/* V7: enforce compact two-column episode/action toolbar on phones and desktop. */
.button-watch.vlxx-player-toolbar {
  display:grid !important;
  grid-template-columns: minmax(44px,1fr) max-content !important;
  align-items:start !important;
  gap:5px 8px !important;
}
.button-watch.vlxx-player-toolbar > .col-xs-5,
.button-watch.vlxx-player-toolbar > .col-xs-7 {
  width:auto !important; padding:0 !important; margin:0 !important;
  min-width:0 !important; max-width:100% !important;
  float:none !important; flex:none !important;
}
.button-watch.vlxx-player-toolbar > .col-xs-5 { grid-column:1; }
.button-watch.vlxx-player-toolbar > .col-xs-7 { grid-column:2; justify-self:end; }
.button-watch.vlxx-player-toolbar .action-movie {
  display:flex !important; flex-wrap:nowrap !important; justify-content:flex-end !important;
  width:max-content !important; max-width:100% !important; margin:0 !important;
  padding:0 !important; gap:4px !important; white-space:nowrap !important;
}
.button-watch.vlxx-player-toolbar .action-movie > div { display:inline-flex !important; margin:0 !important; flex:0 0 auto !important; }
.button-watch.vlxx-player-toolbar .action-movie span { white-space:nowrap !important; }
.button-watch.vlxx-player-toolbar .vlxx-movie-identifiers {
  display:flex; align-items:center; gap:6px; flex-wrap:wrap;
  margin-top:5px; min-height:25px; line-height:1.5;
}
.button-watch.vlxx-player-toolbar .vlxx-movie-identifiers .server-video-code,
.button-watch.vlxx-player-toolbar .vlxx-movie-identifiers .vlxx-source-link {
  display:inline-flex; align-items:center; min-height:22px;
  padding:3px 6px; border-radius:3px; background:#292929;
  font-size:13px; font-weight:400; text-decoration:none;
}
.button-watch.vlxx-player-toolbar .vlxx-movie-identifiers .vlxx-source-link {color:#e34845;}
.button-watch.vlxx-player-toolbar .vlxx-movie-identifiers .vlxx-source-link:hover {color:#ff7771;}
@media(max-width:767px){
  .button-watch.vlxx-player-toolbar {grid-template-columns:minmax(40px,1fr) max-content !important;}
  .button-watch.vlxx-player-toolbar .action-movie {justify-content:flex-end !important; gap:3px !important;}
  .button-watch.vlxx-player-toolbar .action-movie > div > span {padding:3px 4px !important; font-size:11px !important;}
  .button-watch.vlxx-player-toolbar .action-movie > div > span::before {font-size:12px !important;}
  .button-watch.vlxx-player-toolbar .vlxx-movie-identifiers {gap:4px;}
  .button-watch.vlxx-player-toolbar .vlxx-movie-identifiers .server-video-code,
  .button-watch.vlxx-player-toolbar .vlxx-movie-identifiers .vlxx-source-link {font-size:12px;}
}
@media(max-width:355px){
  .button-watch.vlxx-player-toolbar .action-movie {gap:2px !important;}
  .button-watch.vlxx-player-toolbar .action-movie > div > span {padding:2px 3px !important; font-size:10px !important;}
  .button-watch.vlxx-player-toolbar .server-info #halim-list-server .vlxx-compact-server li span {padding:5px 6px;}
}

/* Identifiers have their own full-width row beneath both controls. */
.button-watch.vlxx-player-toolbar > .vlxx-movie-identifiers {
    grid-column:1 / -1; width:100%; min-width:0; margin-top:0;
}
