/*
Theme Name: Vexona Video Wordpress Theme
Theme URI: https://vexona.com/wordpress-video-theme/
Author: Vexona
Author URI: https://vexona.com
Description: A custom WordPress theme.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vexona
Tags: custom, responsive, clean
*/

@import url("css/header-menu.css");
@import url("css/content-row-cards.css");
@import url("css/media-formats.css");

/* = Accessibility
-------------------------------- */

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
  z-index: 1000;
}
.skip-link:focus { top: 0; }

/* Focus styles only for keyboard navigation */
:where(a,button,input,select,textarea):focus-visible {
  outline: 2px solid var(--vexona-color-primary);
  outline-offset: 2px;
}
:where(a,button,input,select,textarea):focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* = Back to Top
-------------------------------- */
.vexona-back-to-top {
  position: fixed;
  inset-block-end: 25px;
  inset-inline-end: 25px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  background: var(--vexona-color-surface);
  color: var(--vexona-color-text-inverted);
  border: 1px solid rgba(0,0,0,.1);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity .3s, visibility .3s, transform .3s;
}
.vexona-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.vexona-back-to-top:hover {
  background: var(--vexona-color-primary);
  color: #fff;
}
.vexona-back-to-top i { font-size: 18px; }

/* = Related Posts
-------------------------------- */
.related-posts {
  max-width: 1100px;
  margin: 60px auto 0;
  padding-top: 40px;
  border-top: 1px solid var(--vexona-color-surface, #eee);
  transition: max-width .25s ease;
}
.vexona-sidebar.pinned ~ .vexona-main .related-posts { max-width: 840px; }

.related-posts-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
  text-align: center;
  color: var(--vexona-color-text-main);
}

.related-posts-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}


/* = 404 Page
-------------------------------- */
.vex-404 { max-width: 1100px; margin: 0 auto 48px; }
.vexona-sidebar.pinned ~ .vexona-main .vex-404 { max-width: 840px; }

.vex-404-inner {
  margin-top: 16px;              /* nice spacing below the fixed header area */
  background: var(--vexona-color-surface);
  color: var(--vexona-color-text-inverted);
}

.vex-404-title {
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 8px 0;
  color: inherit;
}

.vex-404-text {
  font-size: 16px;
  margin: 0 0 20px 0;
  opacity: .9;
}

.vex-404-search form {
  display: flex;
  gap: 8px;
  justify-content: center;
  max-width: 520px;
  margin: 0 auto 16px auto;
}

.vex-404-search input[type="search"] {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid var(--vexona-color-text-inverted-subtle);
  border-radius: 8px;
  background: var(--vexona-color-background);
  color: var(--vexona-color-text-main);
  font-size: 16px;
}

.vex-404-search input[type="submit"],
.vex-404-search button[type="submit"] {
  padding: 12px 16px;
  border-radius: 8px;
  border: none;
  background: var(--vexona-color-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.vex-404-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .vex-404-title { font-size: 26px; }
  .vex-404-search form { flex-direction: column; }
  .vex-404-cta { flex-direction: column; align-items: center; }
}


/* Archive controls */
.vex-archive-controls select {
  padding: 8px 12px;
  border: 1px solid var(--vexona-color-text-inverted-subtle);
  border-radius: 8px;
  background: var(--vexona-color-background);
  color: var(--vexona-color-text-main);
  font-size: 14px;
}


/* --- Media Progress Bar --- */
.vex-card-thumbnail {
    position: relative; /* This is crucial for positioning the bar inside */
    overflow: hidden;   /* Keeps the bar from spilling out if it has a border-radius */
}

.vex-media-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px; /* A good height, similar to YouTube */
     background-color: var(--vexona-color-primary); /* Use the theme's primary color */
    z-index: 2; /* Ensures it's on top of the thumbnail image */
    width: 0; /* The initial width, JS will change this */
    display: none; /* JS will change this to 'block' when needed */
    transition: width 0.2s linear; /* Smooths the update slightly */
}






/* =============================================================
 *  VEXONA: FAVORITES & WATCHLIST UI STYLES (v2.0)
 * ============================================================= */

/* =============================================================
 *  SHARED STYLES
 * ============================================================= */

.vex-action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    background-color: var(--vexona-color-surface);
    color: var(--vexona-color-text-inverted);
    border: 1px solid var(--vexona-color-hover);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.vex-action-button:hover {
    background-color: var(--vexona-color-hover);
    color: var(--vexona-color-primary);
}

.vex-confirm-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--vexona-color-text-main);
}

.vex-confirm-inline .vex-action-button {
    padding: 6px 12px;
}

.vex-action-button.is-danger {
    background-color: #ef4444;
    color: #fff;
    border-color: #dc2626;
}

.vex-action-button.is-danger:hover {
    background-color: #dc2626;
}

.vex-undo-notification {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--vexona-color-surface);
    color: var(--vexona-color-text-inverted);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
}

.vex-action-button.is-link {
    background: none;
    border: none;
    color: var(--vexona-color-primary);
    text-decoration: underline;
    padding: 0;
    font-weight: 700;
}

.vex-action-button.is-link:hover {
    color: var(--vexona-color-primary-dark);
}

/* =============================================================
 *  PAGE LAYOUTS
 * ============================================================= */

.vex-favorites-wrapper .vex-favorites-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 20px;
    min-height: 38px;
}

.vex-card-grid-container {
    display: flex;
    flex-wrap: wrap;
    gap: 32px 16px;
    margin-bottom: 48px;
}

.vex-card-grid-container .vex-card {
    flex-shrink: 1;
}

.vex-empty-state {
    text-align: center;
    padding: 64px 24px;
    background-color: var(--vexona-color-surface);
    border-radius: 12px;
    margin: 0 auto;
    width: 100%;
    max-width: 500px;
}
.vex-empty-state i {
    font-size: 48px;
    color: var(--vexona-color-primary);
    margin-bottom: 16px;
}
.vex-empty-state h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--vexona-color-text-inverted);
    margin: 0 0 8px 0;
}
.vex-empty-state p {
    color: var(--vexona-color-text-inverted-subtle);
    margin-bottom: 24px;
}

/* =============================================================
 *  WATCHLIST UI: MAIN INDICATOR (Bottom Right Popup)
 * ============================================================= */

#vex-watchlist-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background-color: var(--vexona-color-surface);
    color: var(--vexona-color-text-inverted);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2), 0 4px 6px -2px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease-in-out;
}

#vex-watchlist-indicator.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#vex-watchlist-indicator strong {
    font-weight: 600;
    color: var(--vexona-color-text-inverted);
}

#vex-watchlist-indicator .up-next-text {
    display: block;
    font-size: 13px;
    color: var(--vexona-color-text-inverted-subtle);
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#vex-view-queue-btn {
    background: none;
    border: none;
    color: var(--vexona-color-primary);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

#vex-view-queue-btn:hover {
    color: var(--vexona-color-text-inverted);
}

/* =============================================================
 *  WATCHLIST UI: AUTOPLAY TOGGLE
 * ============================================================= */

.indicator-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

#vex-autoplay-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

#vex-autoplay-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--vexona-color-text-inverted-subtle);
}

#vex-autoplay-toggle-btn {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    flex-shrink: 0;
}

#vex-autoplay-toggle-btn::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease-in-out;
}

#vex-autoplay-toggle-btn[aria-checked="true"] {
    background-color: var(--vexona-color-primary);
}

#vex-autoplay-toggle-btn[aria-checked="true"]::before {
    transform: translateX(14px);
}

/* =============================================================
 *  WATCHLIST UI: INLINE QUEUE
 * ============================================================= */

#vex-inline-queue {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    width: 320px;
    background-color: var(--vexona-color-surface);
    color: var(--vexona-color-text-inverted);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2), 0 4px 6px -2px rgba(0,0,0,0.1);
    overflow: hidden;
}

#vex-inline-queue.is-visible {
    display: block;
}

.inline-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.inline-queue-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

#vex-close-queue-btn {
    background: none;
    border: none;
    color: var(--vexona-color-text-inverted-subtle);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.inline-queue-list {
    list-style: none;
    margin: 0;
    padding: 8px;
    max-height: 300px;
    overflow-y: auto;
}

.inline-queue-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border-radius: 4px;
}

.inline-queue-list li a {
    color: var(--vexona-color-text-inverted);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inline-queue-list li a:hover {
    color: var(--vexona-color-primary);
}

.inline-queue-list li.is-playing {
    background-color: rgba(255, 255, 255, 0.1);
}

.inline-queue-list li.is-playing a {
    color: var(--vexona-color-primary);
    font-weight: 700;
}

.inline-queue-list li span {
    font-size: 12px;
    color: var(--vexona-color-primary);
    font-weight: 500;
    flex-shrink: 0;
}
/* =============================================================
 *  RESPONSIVE STYLES (Mobile Overrides)
 * ============================================================= */

@media (max-width: 767px) {
    #vex-watchlist-indicator {
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        padding: 8px 12px;
        justify-content: space-between; 
    }

    #vex-watchlist-indicator .up-next-text {
        display: none;
    }

    #vex-watchlist-indicator strong {
        font-size: 14px;
    }

    #vex-inline-queue {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: calc(100% + 8px);
    }
}

/* =============================================================
 *  VEXONA: HOME PAGE BUILDER BANNER STYLES
 * ============================================================= */

/* --- Base Banner Wrapper --- */
.vex-banner-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--vexona-color-surface);
    color: var(--vexona-color-text-inverted); /* Default text color */
}

.vex-banner-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    transition: background .2s;
}
.vex-banner-dismiss:hover { background: rgba(0,0,0,0.5); }

/* --- Content Styling --- */
.vex-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
}
.vex-banner-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: inherit; /* Inherit from parent */
}
.vex-banner-text {
    font-size: 1.1rem;
    margin: 0 0 24px 0;
    color: inherit; /* Inherit from parent */
    opacity: 0.9;
}
.vex-banner-link {
    display: inline-block;
    padding: 12px 24px;
    background: var(--vexona-color-primary);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s;
}
.vex-banner-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* --- Gradient Backgrounds --- */
.vex-banner-row.is-gradient-sunset { background: linear-gradient(135deg, #FF9A8B 0%, #FF6A88 55%, #FF99AC 100%); }
.vex-banner-row.is-gradient-ocean { background: linear-gradient(135deg, #2AFADF 0%, #4C83FF 100%); }
.vex-banner-row.is-gradient-royal { background: linear-gradient(135deg, #8A2BE2 0%, #9400D3 50%, #4B0082 100%); }
.vex-banner-row.is-gradient-emerald { background: linear-gradient(135deg, #23D5AB 0%, #23A6D5 100%); }
.vex-banner-row.is-gradient-midnight { background: linear-gradient(135deg, #09203F 0%, #537895 100%); }
.vex-banner-row[class*="is-gradient-"] { color: #fff; } /* Gradients default to light text */
.vex-banner-row[class*="is-gradient-"] .vex-banner-link { background: #fff; color: var(--vexona-color-primary); }

/* --- Template 1: Full-Width: Image Background --- */
.vex-banner-row.template-1 {
    min-height: 300px;
    background-size: cover;
    background-position: center center;
    color: #fff; /* Default for image backgrounds */
}

/* NEW: Dedicated Overlay for Blur/Darkness */
.vex-banner-bg-overlay {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); /* Default dark overlay */
    z-index: 1;
    transition: backdrop-filter 0.3s ease;
}

/* --- Template 2: Two-Column: Image Left, Text Right --- */
.vex-banner-row.template-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 0;
    text-align: left;
}
.vex-banner-row.template-2 .vex-banner-content { text-align: left; }

/* MODIFIED: Make container a flexbox for centering the image */
.vex-banner-row.template-2 .vex-banner-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vex-banner-row.template-2 .vex-banner-image img {
    display: block;
    width: 100%;            /* Image will scale relative to this */
    height: auto;
    max-height: 100%;
    object-fit: contain;
}
.vex-banner-row.template-2 .vex-banner-content { padding: 32px; }
@media(max-width: 768px) {
    .vex-banner-row.template-2 { grid-template-columns: 1fr; }
    .vex-banner-row.template-2 .vex-banner-image { max-height: 250px; padding: 16px; }
}

/* --- Template 3: Full-Width: Simple Centered Text --- */
/* No specific styles needed, it uses the base styles */

/* --- Template 4: Full-Width: Simple Text with Action Button --- */
.vex-banner-row.template-4 {
    padding: 16px 24px;
    justify-content: space-between;
}
.vex-banner-row.template-4 .vex-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    max-width: none;
}
.vex-banner-row.template-4 .vex-banner-title { font-size: 1.1rem; margin: 0; }
.vex-banner-row.template-4 .vex-banner-text { display: none; }
.vex-banner-row.template-4 .vex-banner-link { flex-shrink: 0; }
@media(max-width: 768px) {
    .vex-banner-row.template-4 .vex-banner-content { flex-direction: column; gap: 12px; align-items: center; text-align: center; }
}

/* --- Template 5: Full-Width: Split Content (Text Left, Button Right) --- */
.vex-banner-row.template-5 {
    padding: 32px 24px;
}
.vex-banner-row.template-5 .vex-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    max-width: 1100px;
    gap: 24px;
}
.vex-banner-row.template-5 .vex-banner-content-text {
    flex-grow: 1;
}
.vex-banner-row.template-5 .vex-banner-content-action {
    flex-shrink: 0;
}
.vex-banner-row.template-5 .vex-banner-title {
    font-size: 1.5rem;
    margin: 0 0 4px 0;
}
.vex-banner-row.template-5 .vex-banner-text {
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}
@media(max-width: 768px) {
    .vex-banner-row.template-5 .vex-banner-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .vex-banner-row.template-5 .vex-banner-title { font-size: 1.25rem; }
}

/* === TEXT COLOR OVERRIDES === */
.vex-banner-row.is-text-light,
.vex-banner-row.is-text-light .vex-banner-title,
.vex-banner-row.is-text-light .vex-banner-text {
    color: #ffffff !important;
}
.vex-banner-row.is-text-light .vex-banner-link {
    background: #ffffff !important;
    color: #111111 !important;
}
.vex-banner-row.is-text-light .vex-banner-link:hover {
    background: #f0f0f0 !important;
}

.vex-banner-row.is-text-dark,
.vex-banner-row.is-text-dark .vex-banner-title,
.vex-banner-row.is-text-dark .vex-banner-text {
    color: #2c3338 !important;
}
.vex-banner-row.is-text-dark .vex-banner-link {
    background: #2c3338 !important;
    color: #ffffff !important;
}
.vex-banner-row.is-text-dark .vex-banner-link:hover {
    background: #444 !important;
}

