/* ============================================================
   OWL Downline Builder — Frontend Styles
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.owl-dlb-wrap {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

/* ── Program Card ────────────────────────────────────────── */
.owl-dlb-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.owl-dlb-card-joined {
    border-color: #00c853;
}

/* Card Header (badges) */
.owl-dlb-card-header {
    display: flex;
    gap: 8px;
    padding: 12px 20px 0;
    flex-wrap: wrap;
    min-height: 10px;
}

.owl-dlb-joined-badge {
    background: rgba(0,200,83,0.15);
    color: #00c853;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.owl-dlb-locked-badge {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.owl-dlb-override-badge {
    background: rgba(139,92,246,0.15);
    color: #a78bfa;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Program Name */
.owl-dlb-program-name {
    color: #ffffff !important;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 12px 20px 8px !important;
    padding: 0 !important;
}

.owl-dlb-program-name a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.owl-dlb-program-name a:hover {
    color: #00c853 !important;
}

/* Media */
.owl-dlb-media {
    padding: 0 20px;
    margin-bottom: 12px;
}

.owl-dlb-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 6px;
}

.owl-dlb-video-wrap iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

.owl-dlb-program-image {
    max-width: 400px;
    max-height: 300px;
    width: auto;
    height: auto;
    display: block;
    border-radius: 6px;
    object-fit: contain;
}

/* Description */
.owl-dlb-description {
    color: #aaa;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 20px 16px !important;
    padding: 0 !important;
}

/* Actions */
.owl-dlb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 20px 16px;
    border-top: 1px solid #2a2a2a;
    background: #141414;
}

/* ── Inline Forms ────────────────────────────────────────── */
.owl-dlb-join-form,
.owl-dlb-override-form {
    border-top: 1px solid #2a2a2a;
}

.owl-dlb-form-inner {
    padding: 20px;
    background: #111;
}

.owl-dlb-form-inner h4 {
    color: #00c853 !important;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 16px 0 !important;
}

.owl-dlb-form-hint {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 16px !important;
}

.owl-dlb-form-hint code {
    background: #1a1a1a;
    color: #00c853;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* Media Type Toggle */
.owl-dlb-media-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}

.owl-dlb-media-type-btn {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.owl-dlb-media-type-btn.active {
    opacity: 1;
    background: #00c853 !important;
    color: #000 !important;
    border-color: #00c853 !important;
}

/* Image upload */
.owl-upload-btn {
    display: inline-block;
    background: transparent;
    border: 1px solid #444;
    color: #ccc;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: border-color 0.2s, color 0.2s;
}

.owl-upload-btn:hover {
    border-color: #00c853;
    color: #00c853;
}

.owl-dlb-image-preview {
    margin-bottom: 8px;
}

.owl-dlb-image-preview img {
    max-width: 400px;
    max-height: 300px;
    border-radius: 6px;
    border: 1px solid #333;
}

.owl-upload-progress {
    color: #f59e0b;
    font-size: 0.85rem;
    margin-top: 6px;
}

/* Form messages */
.owl-dlb-form-msg {
    margin-top: 12px;
    font-size: 0.85rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .owl-dlb-actions {
        flex-direction: column;
    }

    .owl-dlb-program-image {
        max-width: 100%;
    }
}
