/* Chat page: video search, inline player, demo banner (loaded deferred for performance) */
/* Video search bar - modern YouTube/SaaS style */
.video-search-form {
    width: 100%;
    max-width: 640px;
}
.video-search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: stretch;
    background: var(--tutorly-white, #fff);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    padding: 6px;
    border: 1px solid var(--tutorly-border, #E5E7EB);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.video-search-bar:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
}
.video-search-bar:focus-within {
    box-shadow: 0 4px 16px rgba(107, 70, 193, 0.15);
    border-color: var(--tutorly-purple-light, #A78BFA);
}
.video-search-input-wrap {
    flex: 1;
    min-width: 180px;
    position: relative;
    display: flex;
    align-items: center;
}
.video-search-autocomplete {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 4px;
    background: var(--tutorly-white, #fff);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--tutorly-border, #E5E7EB);
    max-height: 280px;
    overflow-y: auto;
    display: none;
}
.video-search-autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 0.9375rem;
    color: var(--tutorly-text, #1F2937);
    transition: background 0.15s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.video-search-autocomplete-item:last-child {
    border-bottom: none;
}
.video-search-autocomplete-item:hover,
.video-search-autocomplete-item.active {
    background: rgba(107, 70, 193, 0.08);
    color: var(--tutorly-purple-dark, #5B21B6);
}
.video-search-autocomplete-empty {
    padding: 16px;
    font-size: 0.9rem;
    color: var(--tutorly-text-light, #6B7280);
}
.video-search-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: var(--tutorly-text-light, #6B7280);
    pointer-events: none;
    flex-shrink: 0;
}
.video-search-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px 12px 46px;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--tutorly-text, #1F2937);
    background: transparent;
    border: none;
    border-radius: 8px;
    outline: none;
    transition: background 0.2s ease;
}
.video-search-input::placeholder {
    color: var(--tutorly-text-light, #6B7280);
}
.video-search-input:hover {
    background: rgba(0, 0, 0, 0.02);
}
.video-search-input:focus {
    background: rgba(107, 70, 193, 0.03);
}
.video-search-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.video-search-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 20px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.video-search-btn-primary {
    background: var(--tutorly-purple, #6B46C1);
    color: white;
    box-shadow: 0 2px 4px rgba(107, 70, 193, 0.3);
}
.video-search-btn-primary:hover {
    background: var(--tutorly-purple-dark, #5B21B6);
    color: white;
    box-shadow: 0 4px 8px rgba(107, 70, 193, 0.35);
    transform: translateY(-1px);
}
.video-search-btn-primary:active {
    transform: translateY(0);
}
.video-search-btn-primary:focus-visible {
    outline: 2px solid var(--tutorly-purple-light, #A78BFA);
    outline-offset: 2px;
}
.video-search-btn-clear {
    background: transparent;
    color: var(--tutorly-text-light, #6B7280);
    border: 1px solid var(--tutorly-border, #E5E7EB);
}
.video-search-btn-clear:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--tutorly-text, #1F2937);
    border-color: var(--tutorly-text-light, #6B7280);
}
.video-search-btn-clear:focus-visible {
    outline: 2px solid var(--tutorly-purple-light, #A78BFA);
    outline-offset: 2px;
}
.video-show-all-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(107, 70, 193, 0.08);
    border: 1px solid var(--tutorly-border, #E5E7EB);
    border-radius: 8px;
}
.video-search-active-text {
    font-size: 0.9rem;
    color: var(--tutorly-text, #1F2937);
}
.video-show-all-link {
    font-weight: 600;
    color: var(--tutorly-purple, #6B46C1);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.video-show-all-link:hover {
    color: var(--tutorly-purple-dark, #5B21B6);
}
@media (max-width: 575.98px) {
    .video-search-bar {
        flex-direction: column;
        padding: 8px;
    }
    .video-search-input-wrap {
        min-width: 100%;
    }
    .video-search-input {
        height: 46px;
    }
    .video-search-actions {
        width: 100%;
        justify-content: stretch;
    }
    .video-search-btn {
        flex: 1;
        height: 44px;
    }
}

/* Inline video player - mobile responsive */
#inline-video-player-wrap {
    width: 100%;
    max-width: 100%;
}
#inline-video-player-wrap .card {
    border-radius: 8px;
    overflow: hidden;
}
#inline-video-player-wrap iframe {
    min-height: 180px;
}
@media (max-width: 575.98px) {
    #inline-video-player-wrap h5 {
        font-size: 0.95rem !important;
    }
    #inline-video-player-wrap .card-body,
    #inline-video-player-wrap .position-relative {
        min-height: 180px !important;
    }
}

/* Free demo banner above chat */
.demo-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(107, 70, 193, 0.06);
    border-left: 3px solid var(--tutorly-purple, #6B46C1);
}
.demo-banner-icon {
    font-size: 1.2rem;
    line-height: 1;
}
