/* SV Auto Video Gallery Styles */
.sv-search-container { 
    margin: 0 auto 1.5em;
    max-width: 600px;
    width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
    position: relative;
}
.sv-search-wrapper {
    position: relative;
    width: 100%;
    margin: 0 auto;
}
#sv-search {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
#sv-search:focus {
    border-color: #aaa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sv-autocomplete {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    scrollbar-width: thin;
    scrollbar-color: #ccc #f0f0f0;
    margin-top: 5px;
}

/* Custom scrollbar for Webkit browsers */
.sv-autocomplete::-webkit-scrollbar {
    width: 4px;
}
.sv-autocomplete::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 2px;
    margin: 8px 0;
}
.sv-autocomplete::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    transition: background-color 0.3s ease;
}
.sv-autocomplete::-webkit-scrollbar-thumb:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

/* Firefox scrollbar */
.sv-autocomplete {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}
.sv-autocomplete:hover {
    scrollbar-color: rgba(0, 0, 0, 0.3) transparent;
}

.sv-autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    text-align: left;
    border-bottom: 1px solid #eee;
    color: #333;
    transition: background-color 0.2s ease;
    line-height: 1.4;
}
.sv-autocomplete-item:last-child {
    border-bottom: none;
}
.sv-autocomplete-item:hover,
.sv-autocomplete-item.highlighted {
    background-color: #f0f0f0;
    color: #000;
}
#sv-search { 
    padding: 0.5em 1em; 
    width: 300px; 
    max-width: 80%; 
    border-radius: 5px; 
    border: 1px solid #ccc; 
    font-size: 16px;
}
.sv-video-gallery { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 16px; 
    justify-content: center;
    padding: 1em;
}
.sv-video-item { 
    width: 280px; 
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.sv-video-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.sv-video-wrapper { 
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}
.sv-video { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.sv-overlay { 
    position: absolute; 
    top: 12px; 
    right: 12px; 
    display: flex; 
    gap: 8px; 
    opacity: 0;
    transition: opacity 0.2s ease;
}
.sv-video-item:hover .sv-overlay {
    opacity: 1;
}
.sv-icon { 
    background: rgba(255,255,255,0.9); 
    border: none; 
    border-radius: 50%; 
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}
.sv-icon:hover {
    background: #fff;
    transform: scale(1.1);
}
.sv-icon svg { 
    width: 18px; 
    height: 18px; 
}
.sv-modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    background: rgba(0,0,0,0.9); 
    align-items: center; 
    justify-content: center; 
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}
.sv-modal-content { 
    width: 100%;
    max-width: 1200px;
    position: relative;
}
.sv-modal-video { 
    width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    outline: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sv-video-item {
        width: 100%;
        max-width: 400px;
    }
    #sv-search {
        width: 90%;
    }
}