/* ==========================================================================
   Tudatos Subscriptions — Video Player CSS
   Facade player, video grid, search
   ========================================================================== */

/* --------------------------------------------------------------------------
   Video grid
   -------------------------------------------------------------------------- */
.tudatos-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 24px 0;
}

.tudatos-video-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}

.tudatos-video-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* --------------------------------------------------------------------------
   Facade player
   -------------------------------------------------------------------------- */
.tudatos-facade {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

.tudatos-facade__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease, opacity 0.2s;
}

.tudatos-facade:hover .tudatos-facade__poster {
    transform: scale(1.03);
    opacity: .85;
}

/* Play button */
.tudatos-facade__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,.9);
    border-radius: 50%;
    pointer-events: none;
    transition: transform 0.2s, background 0.2s;
}

.tudatos-facade__play::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #1d2327;
}

.tudatos-facade:hover .tudatos-facade__play {
    background: #fff;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Active state (playing) */
.tudatos-facade--active .tudatos-facade__play,
.tudatos-facade--active .tudatos-facade__poster,
.tudatos-facade--active .tudatos-facade__duration,
.tudatos-facade--active .tudatos-facade__free-badge {
    display: none;
}

.tudatos-facade--active iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Duration badge */
.tudatos-facade__duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* Free badge */
.tudatos-facade__free-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #10b981;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

/* Lock state */
.tudatos-facade--locked {
    cursor: default;
}

.tudatos-facade--locked .tudatos-facade__poster {
    filter: brightness(0.4) blur(2px);
}

.tudatos-facade__lock {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}

.tudatos-facade__lock-icon {
    font-size: 28px;
}

.tudatos-facade__lock-text {
    font-size: 13px;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* --------------------------------------------------------------------------
   Video meta (below player)
   -------------------------------------------------------------------------- */
.tudatos-video-meta {
    padding: 12px 16px;
    flex: 1;
}

.tudatos-video-meta__date {
    display: block;
    font-size: 12px;
    color: #a7aaad;
    margin-bottom: 4px;
}

.tudatos-video-meta__title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.3;
}

.tudatos-video-meta__duration {
    font-size: 13px;
    color: #787c82;
    display: block;
    margin-bottom: 6px;
}

.tudatos-video-meta__description {
    font-size: 13px;
    color: #50575e;
    line-height: 1.5;
}

.tudatos-video-meta__description p {
    margin: 0 0 6px;
}

.tudatos-video-meta__description p:last-child {
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Single video ([tudatos_video])
   -------------------------------------------------------------------------- */
.tudatos-video-single {
    max-width: 960px;
    margin: 0 auto;
}

.tudatos-video-single .tudatos-facade {
    border-radius: 8px;
}

/* --------------------------------------------------------------------------
   AJAX search
   -------------------------------------------------------------------------- */
.tudatos-search {
    margin-bottom: 24px;
}

.tudatos-search__input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.tudatos-search__icon {
    position: absolute;
    left: 12px;
    color: #787c82;
    pointer-events: none;
}

.tudatos-search__input {
    width: 100%;
    padding: 11px 40px 11px 40px;
    border: 1px solid #c0c0c0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.tudatos-search__input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79,70,229,.1);
}

.tudatos-search__clear {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    font-size: 16px;
    color: #787c82;
    cursor: pointer;
    padding: 4px;
}

.tudatos-search__clear:hover {
    color: #1d2327;
}

.tudatos-search__results {
    margin-top: 12px;
}

.tudatos-search__status {
    font-size: 13px;
    color: #787c82;
    margin-top: 8px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .tudatos-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .tudatos-video-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
