﻿:root {
    --bg-page: #F4F3F0;
    --bg-card: #FFFFFF;
    --bg-surface: #F8F7F5;
    --bg-hover: #F0EFF9;
    --teal: #00B388;
    --teal-light: #e0efeb;
    --teal-mid: #83c5b5;
    --accent: #5548C8;
    --accent-light: #EAE8FA;
    --accent-mid: #A09BE0;
    --accent-dark: #3B3491;
    --text-primary: #1A1A1A;
    --text-secondary: #5C5C5C;
    --text-tertiary: #9A9A9A;
    --border: rgba(0,0,0,0.08);
    --border-focus: #5548C8;
    --danger: #C84848;
    --success: #2E7D52;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    --shadow-focus: 0 0 0 3px rgba(85,72,200,0.15);
    --font: 'DM Sans', sans-serif;
    --font-mono: 'DM Mono', monospace;
}

/* ── Media section visibility ── */
.media-section {
    display: none;
}

    .media-section.visible {
        display: block;
    }

/* ── Media source toggle ── */
.source-toggle {
    display: flex;
    gap: 6px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    /*border-radius: var(--radius-md);*/
    border-radius: 0;
    padding: 4px;
    width: fit-content;
    margin-bottom: 14px;
}

.source-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    /*border-radius: var(--radius-sm);*/
    border-radius: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
    border: none;
    background: transparent;
    font-family: var(--font);
}

    .source-btn svg {
        width: 15px;
        height: 15px;
    }

    .source-btn:hover {
        background: var(--teal-light);
        color: var(--text-primary);
    }

    .source-btn.active {
        background: var(--bg-card);
        color: var(--teal);
        box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    }

/* ── Upload zone ── */
.upload-zone {
    border: 1.5px dashed var(--border);
    /*border-radius: var(--radius-lg);*/
    border-radius: 0;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: var(--bg-surface);
    transition: border-color 0.2s, background 0.2s;
    text-align: center;
    position: relative;
}

    .upload-zone:hover {
        border-color: var(--teal-mid);
        background: var(--teal-light);
    }

    .upload-zone.drag-over {
        border-color: var(--teal);
        background: var(--teal-light);
    }

    .upload-zone input[type="file"] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
        width: 100%;
        height: 100%;
    }

.upload-icon-wrap {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    /*border-radius: var(--radius-md);*/
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .upload-icon-wrap svg {
        width: 20px;
        height: 20px;
        stroke: var(--text-secondary);
    }

.upload-main {
    font-size: 13.5px;
    color: var(--text-secondary);
}

    .upload-main strong {
        color: var(--teal);
        font-weight: 500;
    }

.upload-hint {
    font-size: 11.5px;
    color: var(--text-tertiary);
}

.file-chosen {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--teal-light);
    /*border-radius: var(--radius-md);*/
    border-radius: 0;
    font-size: 13px;
    color: var(--teal);
    font-weight: 500;
}

    .file-chosen.visible {
        display: flex;
    }

    .file-chosen svg {
        width: 15px;
        height: 15px;
        stroke: var(--teal);
        flex-shrink: 0;
    }

.file-remove {
    margin-left: auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    color: var(--teal);
    opacity: 0.6;
    transition: opacity 0.15s;
    background: none;
    border: none;
    font-size: 16px;
    line-height: 1;
}

    .file-remove:hover {
        opacity: 1;
    }

/* ── Video embed section ── */
.video-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

    .video-input-row input {
        flex: 1;
    }

.btn-embed {
    padding: 7px 16px;
    /*background: var(--teal);*/
    background: #00B388;
    color: #fff;
    border: none;
    /*border-radius: var(--radius-md);*/
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

    .btn-embed:hover {
        /*background: var(--teal-dark);*/
        background: #18adaa;
    }

.video-preview {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

    .video-preview.visible {
        display: flex;
    }

.video-frame-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /*border-radius: var(--radius-lg);*/
    border-radius: 0;
    overflow: hidden;
    background: #000;
    border: 1px solid var(--border);
}

    .video-frame-wrap iframe {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

.video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    /*border-radius: var(--radius-md);*/
    border-radius: 0;
    font-size: 12.5px;
    color: var(--text-secondary);
}

    .video-meta .platform-badge {
        display: flex;
        align-items: center;
        gap: 5px;
        font-weight: 500;
    }

.badge-yt {
    color: #CC0000;
}

.badge-vm {
    color: #1AB7EA;
}

.btn-remove-video {
    background: none;
    border: none;
    color: var(--text-tertiary);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font);
    padding: 2px 6px;
    /*border-radius: var(--radius-sm);*/
    border-radius: 0;
    transition: color 0.15s, background 0.15s;
}

    .btn-remove-video:hover {
        color: var(--danger);
        background: #FEF2F2;
    }

.url-error {
    font-size: 12px;
    color: var(--danger);
    display: none;
    margin-top: 4px;
}

    .url-error.visible {
        display: block;
    }
