:root {
    /* Brand Colors */
    --lvm-primary: #6366f1;        /* Indigo */
    --lvm-primary-hover: #4f46e5;
    --lvm-secondary: #64748b;      /* Slate */
    --lvm-success: #10b981;        /* Emerald */
    --lvm-danger: #ef4444;         /* Rose */
    --lvm-warning: #f59e0b;        /* Amber */
    
    /* Surface & Borders */
    --lvm-bg: #ffffff;
    --lvm-surface: #f8fafc;        /* Light slate bg */
    --lvm-border: #e2e8f0;
    --lvm-border-focus: var(--lvm-primary);
    
    /* Text */
    --lvm-text-main: #1e293b;
    --lvm-text-muted: #64748b;
}
/* Custom Checkbox Theme */
.lvm-declarations-wrapper .form-check-input:checked[type=checkbox] {
    background-color: var(--lvm-primary);
    border-color: var(--lvm-primary);
    /* Updated SVG with your theme color background and white tick */
    --bs-form-check-bg-image: url(data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e);
}
.form-label{
    z-index: 0;
}
.lvm-form-container .input-group .form-control{
    border-left:1px solid #ddd !important;
}
.form-select:focus{
    box-shadow: none !important;
}
.select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field:focus,.select2-container--bootstrap-5.select2-container--focus .select2-selection, .select2-container--bootstrap-5.select2-container--open .select2-selection{
    box-shadow: none !important;
}
/* Hover Effect for the Declaration Row */
.custom-declaration-check {
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.custom-declaration-check:hover {
    background-color: var(--lvm-primary-soft);
    border-color: var(--lvm-primary-soft);
}

/* Focus Ring Theme */
.form-check-input:focus {
    border-color: var(--lvm-primary);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
/* --- Global Component Theming --- */

.lvm-form-container {
    color: var(--lvm-text-main);
}

/* 1. Buttons - Custom Flat Style */
.lvm-form-container .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
}
.btn-primary {
    background-color: var(--lvm-primary) !important;
    border-color:var(--lvm-primary) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}
.lvm-form-container .btn-primary {
    background-color: var(--lvm-primary) !important;
    color: #ffffff !important;
}

.lvm-form-container .btn-primary:hover {
    background-color: var(--lvm-primary-hover) !important;
    transform: translateY(-1px);
}

.lvm-form-container .btn-success {
    background-color: var(--lvm-success) !important;
}

.lvm-form-container .btn-outline-danger {
    border: 1px solid var(--lvm-danger) !important;
    color: var(--lvm-danger) !important;
    background: transparent;
}

.lvm-form-container .btn-outline-danger:hover {
    background: var(--lvm-danger) !important;
    color: #fff !important;
}

/* 2. Badges (Used in Dashboard) */
.lvm-form-container .badge {
    padding: 0.5em 0.8em;
    border-radius: 6px;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
}

.lvm-form-container .bg-success { background-color: var(--lvm-success) !important; }
.lvm-form-container .bg-warning { background-color: var(--lvm-warning) !important; color: #000; }

/* 3. Cards (Login & Video Items) */
.lvm-form-container .card {
    background: var(--lvm-bg);
    border: 1px solid var(--lvm-border);
    border-radius: 12px;
    overflow: hidden;
}

.lvm-form-container .card-title {
    color: var(--lvm-text-main);
    font-weight: 700;
}

/* 4. Alerts */
.lvm-form-container .alert {
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
}

.lvm-form-container .alert-danger {
    background-color: #fee2e2;
    color: var(--lvm-danger);
}

.lvm-form-container .alert-info {
    background-color: #e0e7ff;
    color: var(--lvm-primary);
}
/* 1. Force identical border colors for the entire group */
.input-group .input-group-text,
.input-group .form-control,.form-control {
    border-color: #dee2e6 !important; /* Standard Bootstrap light grey */
    background-color: #ffffff;        /* Optional: Makes both white for a clean look */
}

/* 2. Remove the internal divider */
.input-group .input-group-text {
    border-right: none !important;
}

.input-group .form-control {
    border-left: none !important;
}

/* 3. Handle the Hover State (Unified) */
.input-group:hover .input-group-text,
.input-group:hover .form-control {
    border-color: #bbbfc3 !important;
}

/* 4. Handle the Focus State (Unified) */
/* Using :focus-within ensures both parts turn blue when the user clicks the input */
.input-group:focus-within .input-group-text,
.input-group:focus-within .form-control {
    border-color: #86b7fe !important;
    border-style: solid;
    z-index: 3;
}

/* 5. Handle the Invalid State (Unified) */
.input-group:has(.is-invalid) .input-group-text,
.input-group:has(.is-invalid) .form-control {
    border-color: #dc3545 !important;
}

/* 2. Remove the "double border" look where the icon and input meet */
.input-group:has(.is-invalid) .input-group-text + .form-control {
    border-left: none;
}

/* 3. Handle the focus shadow to glow red across the whole group */
.input-group:has(.form-control.is-invalid:focus) {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
    border-radius: 0.375rem;
}

/* 4. Fix for older browsers not supporting :has() */
.input-group .form-control.is-invalid {
    z-index: 3; /* Brings the red border to the front */
}

/* 1. Remove focus outline and box-shadow for all form controls */
.lvm-form-container .form-control:focus,
.lvm-form-container .form-control.is-invalid:focus,
.lvm-form-container .form-control.is-valid:focus {
    box-shadow: none !important;
    outline: none !important;
}



/* 4. Remove the group shadow fix we discussed earlier */
.input-group:has(.form-control.is-invalid:focus) {
    box-shadow: none !important;
}
/* --- Hyperlink & Action Text Theming --- */

.lvm-form-container a {
    color: var(--lvm-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.lvm-form-container a:hover {
    color: var(--lvm-primary-hover);
    text-decoration: underline; /* Standard UX pattern for clarity */
}

/* Specific styling for "Forgot Password" or "Muted" links */
.lvm-form-container a.text-muted {
    color: var(--lvm-text-muted) !important;
}

.lvm-form-container a.text-muted:hover {
    color: var(--lvm-text-main) !important;
    text-decoration: none;
}

/* Styling for links inside Alerts to ensure contrast */
.lvm-form-container .alert a {
    font-weight: 700;
    text-decoration: underline;
}

.lvm-form-container .alert-danger a {
    color: #991b1b; /* Darker red for readability against light red bg */
}

.lvm-form-container .alert-info a {
    color: var(--lvm-primary) !important /* Darker indigo for readability against light blue bg */
}

/* Avatar styling */
.user-avatar-sm img {
    border-radius: 50%;
    border: 2px solid var(--lvm-primary) !important;
}

/* Indigo Outline Button */
.btn-indigo-outline {
    color: #6366f1;
    border: 2px solidvar(--lvm-primary) !important;
    background: transparent;
    border-radius: 50px;
    padding: 5px 15px;
    font-weight: 600;
}

.btn-indigo-outline:hover {
    background:var(--lvm-primary) !important;
    color: #fff;
}

/* Dropdown styling */
.lvm-user-dropdown .dropdown-menu {
    border-radius: 12px;
    padding: 10px;
    min-width: 200px;
    margin-top: 10px;
}

.lvm-user-dropdown .dropdown-item {
    padding: 10px 15px;
    border-radius: 8px;
    transition: background 0.2s;
}

.lvm-user-dropdown .dropdown-item:hover {
    background-color: #f5f7ff;
    color: var(--lvm-primary) !important
}

.text-indigo {
    color: var(--lvm-primary) !important
}
.lvm-form-container .error, label.error  {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* 8. Fix for floating error messages inside flex groups */
.lvm-form-container .input-group + span.error {
    margin-top: 5px;
}
.list-group-item.active{
background-color: var(--lvm-primary) !important;
border-color:var(--lvm-primary) !important;
}
.lvm-app-shell .list-group a{
    text-decoration: none;
}

.studio-card { transition: all 0.3s ease; }
.studio-card:hover { transform: translateY(-5px); box-shadow: 0 1rem 3rem rgba(0,0,0,.175)!important; }

/* Show animated preview on hover */
.studio-card:hover .lvm-preview-img { opacity: 1 !important; }

.thumbnail-wrapper { background-color: #000; overflow: hidden; }

.actions-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.3s;
}
.studio-card:hover .actions-overlay { opacity: 1; }

.btn-glass {
    width: 45px; height: 45px; border-radius: 50%;
    background: rgba(255,255,255,0.2); backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.4); color: white;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.btn-glass:hover { background: white; color: black; }

.bg-primary-soft { background-color: #e7f1ff; color: #0d6efd; }
.bg-success-soft { background-color: #e6fcf5; color: #00d084; }
.bg-warning-soft { background-color: #fff9db; color: #fab005; }
.tiny { font-size: 0.7rem; }

#lvmPlayerModal button.btn-close{
     border: none;
    right: 20px;
    position: absolute;
    top: 20px;
    background-color: white;
    color: #fff;
    opacity: 1;
    height: auto;
    padding: 15px;
    border-radius: 100px;
    z-index: 9;
}
/* Modal content forced to 16:9 */
#lvmPlayerModal .modal-body {
    background: #000;
    min-height: 300px; /* Prevents modal from being a tiny sliver while loading */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
}

/* The SDK container */
#bunny-player-container {
    width: 100%;
    transition: opacity 0.4s ease-in-out;
}

/* Ensure the spinner is centered above the black background */
#lvm-player-loader {
    position: absolute;
    z-index: 5;
}


/* single page template*/

.bg-dark { background-color: #0f0f0f !important; } /* True black/dark grey */
.transition { transition: all 0.2s ease; }
.x-small { font-size: 0.75rem; }

.lvm-main-player-wrapper {
    border: 1px solid rgba(255,255,255,0.1);
    background-color: #000;
}

/* Spinner adjustment */
#lvm-player-loader .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.2em;
}

/* Top search bar */
 .cesw-search-bar {
    display: flex;
    max-width: 600px;
    margin: auto;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.cesw-search-bar input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
}
.cesw-search-bar input:focus{
    border:none;
}

.cesw-search-bar button {
    background: var( --lvm-primary);
    color: #fff;
    border: none;
    padding: 0 25px;
    cursor: pointer;
}

.cesw-search-bar button:hover {
    background: var( --lvm-primary);
}
/* End seach bar*/

/* User profile menu */
      /* Wrapper */
.lvm-user-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

/* Toggle Button */
.lvm-user-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 50%;
}

.lvm-user-toggle img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: 0.2s ease;
}

.lvm-user-toggle img:hover {
    transform: scale(1.05);
}

/* Dropdown Menu */
.lvm-user-dropdown-menu {
    position: absolute;
    right: 0;
    top: 50px;
    width: 280px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
    padding: 10px 0;
    display: none;
    z-index: 9999;
    animation: lvmFadeIn 0.15s ease-in-out;
}

/* Header Section */
.lvm-user-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-align: left;
}

.lvm-user-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 12px;
}

.lvm-user-meta strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #111;
}

.lvm-user-meta small {
    font-size: 13px;
    color: #777;
}

/* Divider */
.lvm-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

/* Menu Items */
.lvm-dropdown-item {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    font-size: 14px;
    color: #222;
    transition: background 0.2s ease;
    text-align: left;
}

.lvm-dropdown-item:hover {
    background: #f5f5f5;
}

/* Logout Styling */
.lvm-logout {
    color: #d93025;
    font-weight: 500;
}

.lvm-logout:hover {
    background: #fdecea;
}

/* Login Button */
.lvm-login-btn {
    font-weight: 600;
    text-decoration: none;
    color: #065fd4;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #065fd4;
    transition: 0.2s ease;
}

.lvm-login-btn:hover {
    background: #065fd4;
    color: #fff;
}
/* Circle Profile Icon */
.lvm-user-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #cc0000; /* YouTube red */
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.lvm-user-circle:hover {
    opacity: 0.9;
}

.lvm-user-circle.large {
    width: 48px;
    height: 48px;
    font-size: 18px;
    margin-right: 12px;
}

/* Header Layout */
.lvm-user-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

/* Animation */
@keyframes lvmFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* end user profile menu */

/* video listing page*/
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    line-height: 1.4;
    height: 2.8em;
}

.yt-style-card .play-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: 0.3s ease;
}

.yt-style-card:hover .play-overlay { opacity: 1; }
.yt-style-card:hover img { transform: scale(1.05); }

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    line-height: 1.2;
}

.tiny {
    font-size: 0.75rem;
}

.btn-white {
    background: #fff;
    color: #000;
}

.btn-white:hover {
    background: #f2f2f2;
}

.yt-sidebar-item:hover h6 {
    color: #0d6efd !important; /* Visual feedback on hover */
}

/* Hide scrollbar for category pills */
.scrollbar-hidden::-webkit-scrollbar {
    display: none;
}
.scrollbar-hidden {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
/* end video listing page*/
.page-menu ul{
    margin:0;
    padding:0;
    list-style: none;
}

/* --- YouTube Style Toast (Bottom Left) --- */
.lvm-yt-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: #212121; /* YouTube Dark Gray */
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 999999;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    animation: lvmSlideUp 0.3s ease;
}

/* --- YouTube Style Login Modal --- */
.lvm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Dark Dim */
    z-index: 99999;
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px); /* Modern blur effect */
}

.lvm-modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 24px 48px rgba(0,0,0,0.2);
}

.lvm-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    border: none;
    background: none;
    color: #606060;
    text-decoration: none;
}

.lvm-signin-btn {
    display: inline-block;
    margin-top: 24px;
    padding: 10px 24px;
    background: #065fd4; /* YouTube Blue */
    color: #fff !important;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.2s;
}

.lvm-signin-btn:hover {
    background: #0556bf;
}

/* Animation for the Toast */
@keyframes lvmSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}



/* Red border for missed checkboxes on validation */
.lvm-declarations-list .form-check-input.is-invalid {
    border-color: #dc3545 !important;
}

.select2-container--open .select2-dropdown--above {
    margin-top: 35px !important; /* Adjust based on your label height */
}

/* Add spacing between the label and the Select2 box */
.lvm-select2-wrapper {
    position: relative;
    padding-top: 5px;
}

.lvm-select2-wrapper label {
    margin-bottom: 10px !important;
    display: block;
}

/* Ensure the container doesn't overlap the label */
.select2-container--bootstrap-5 {
    margin-top: 5px;
}

.bg-emerald-soft { background-color: rgba(16, 185, 129, 0.1) !important; }
.text-emerald { color: #10b981 !important; }

.bg-amber-soft { background-color: rgba(245, 158, 11, 0.1) !important; }
.text-amber { color: #f59e0b !important; }

.bg-indigo-soft { background-color: rgba(99, 102, 241, 0.1) !important; }
.text-indigo { color: #6366f1 !important; }

.bg-danger-soft { background-color: rgba(239, 68, 68, 0.1) !important; }
.text-danger { color: #ef4444 !important; }

.bg-secondary-soft { background-color: rgba(108, 117, 125, 0.1) !important; }
.my-videos-dropdown ul{
    padding: 20px;
}
.my-videos-dropdown ul li a{
    text-decoration: none !important;
    border-radius: 5px;
}
.my-videos-dropdown ul li a:hover{
    background: #eae3e3;
}
#thumbnail-preview-wrapper button{
        padding: 5px;
    width: 30px;
    height: 30px;
    line-height: 0;
}
.form-control.is-invalid, .was-validated .form-control:invalid{
    border-color:red !important
}