
.vsb-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.vsb-popup-inner {
    background: #fff;
    width: 900px;
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.vsb-popup-inner h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

.vsb-popup-inner h3 {
    margin-top: 25px;
    margin-bottom: 15px;
    color: #555;
    font-size: 18px;
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 8px;
}

.vsb-popup-inner label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.vsb-popup-inner label small {
    font-weight: normal;
    color: #999;
    font-size: 12px;
}

.vsb-popup-inner input[type="text"],
.vsb-popup-inner input[type="color"],
.vsb-popup-inner textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.vsb-popup-inner input[type="color"] {
    width: 80px;
    height: 40px;
    padding: 2px;
    cursor: pointer;
}

.vsb-popup-inner textarea {
    resize: vertical;
    font-family: inherit;
}

.vsb-color-option {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.vsb-color-option label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 0;
    font-weight: normal;
    cursor: pointer;
}

.vsb-color-picker-group {
    margin-bottom: 15px;
}

.vsb-color-picker-group label {
    display: inline-block;
    margin-right: 10px;
    margin-top: 0;
}

.vsb-btn {
    background: #0073aa;
    color: #fff;
    padding: 10px 20px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.vsb-btn:hover {
    background: #005a87;
}

.vsb-btn-secondary {
    background: #666;
}

.vsb-btn-secondary:hover {
    background: #555;
}

.vsb-btn-primary {
    background: #0073aa;
    margin-left: 10px;
}

.vsb-actions {
    text-align: right;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.vsb-video-card-field {
    border: 2px solid #e5e5e5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #f9f9f9;
    transition: border-color 0.2s;
}

.vsb-video-card-field:hover {
    border-color: #0073aa;
}

.vsb-video-card-field label {
    margin-top: 12px;
    margin-bottom: 6px;
}

.vsb-video-card-field input,
.vsb-video-card-field textarea {
    margin-bottom: 8px;
}

#vsb-preview {
    margin-top: 20px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #ddd;
    max-height: 600px;
    overflow-y: auto;
}

#vsb-preview .vsb-section-wrapper {
    margin: 0;
    max-width: 100%;
}

#vsb-preview .vsb-videos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#vsb-preview .vsb-video-card {
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    #vsb-preview .vsb-videos-container {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    #vsb-preview .vsb-video-card {
        width: calc(50% - 10px);
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 767px) {
    #vsb-preview .vsb-video-card {
        width: 100%;
        flex: 0 0 100%;
    }
}

#vsb-preview .vsb-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Frontend styles for video cards */
.vsb-section-wrapper {
    margin: 20px 0;
    position: relative;
    cursor: pointer;
}

/* Make sections more visible in editor for editing */
.mce-content-body .vsb-section-wrapper:hover {
    outline: 2px dashed #0073aa;
    outline-offset: 2px;
}

.mce-content-body .vsb-section-wrapper {
    transition: outline 0.2s;
}

.vsb-videos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* Two columns on desktop, one column on mobile */
.vsb-video-card {
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .vsb-videos-container {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .vsb-video-card {
        width: calc(50% - 10px);
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 767px) {
    .vsb-video-card {
        width: 100%;
        flex: 0 0 100%;
    }
}

.vsb-video-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.vsb-video-card a:hover {
    background: #e0e0e0 !important;
}

/* Embedded video styling */
.vsb-video-card iframe {
    border-radius: 8px;
}

.vsb-video-card .vsb-video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 12px;
    background: #000;
}

.vsb-video-card .vsb-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
