/* ── SCDev Reels ─────────────────────────────────────────────────────────── */
.scdev-reels-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px; }

/* Tabs */
.reels-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.reels-tab {
    padding: 4px 14px; border-radius: 20px; border: 2px solid #ddd;
    background: transparent; cursor: pointer; font-size: 13px; font-weight: 600;
    transition: all .2s; line-height: 1.4;
}
.reels-tab.active, .reels-tab:hover { background: #111; color: #fff; border-color: #111; }
.reels-tab-new { border-color: #e91e8c; color: #e91e8c; }
.reels-tab-new.active, .reels-tab-new:hover { background: #e91e8c; color: #fff; border-color: #e91e8c; }

body.night-mode .reels-tab { border-color: #444; color: #ccc; }
body.night-mode .reels-tab.active, body.night-mode .reels-tab:hover { background: #fff; color: #111; border-color: #fff; }

/* Grid */
.reels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

/* Card */
.reels-card {
    border-radius: 12px; overflow: hidden; cursor: pointer;
    background: #f5f5f5; position: relative;
    transition: transform .2s, box-shadow .2s;
}
.reels-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
body.night-mode .reels-card { background: #1e1e1e; }

.reels-card-thumb {
    width: 100%; height: 240px; object-fit: cover; display: block;
}
.reels-card-thumb-placeholder {
    width: 100%; height: 240px; display: flex; align-items: center;
    justify-content: center; font-size: 40px; background: #222; color: #fff;
}

.reels-card-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    padding: 32px 10px 10px;
    color: #fff;
}
.reels-card-title { font-size: 13px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.reels-card-meta { font-size: 11px; opacity: .8; display: flex; gap: 8px; }

.reels-card-ppv { display: none; }

.reels-card-delete {
    position: absolute; top: 8px; left: 8px;
    background: rgba(200,0,0,.8); color: #fff; border: none;
    border-radius: 50%; width: 26px; height: 26px; cursor: pointer;
    font-size: 13px; display: none; align-items: center; justify-content: center;
}
.reels-card:hover .reels-card-delete { display: flex; }

/* Load more */
.reels-load-more-wrap { text-align: center; margin-top: 24px; }
.reels-load-more {
    padding: 10px 32px; border-radius: 20px; border: 2px solid #ddd;
    background: transparent; cursor: pointer; font-size: 14px; font-weight: 600;
}
.reels-load-more:hover { background: #111; color: #fff; border-color: #111; }
body.night-mode .reels-load-more { border-color: #444; color: #ccc; }

/* ── New Reel Form ─────────────────────────────────────────────────────────── */
.reels-form-wrap {
    max-width: 560px; margin: 0 auto;
    background: #f9f9f9; border-radius: 16px; padding: 28px;
}
body.night-mode .reels-form-wrap { background: #1a1a1a; }

.reels-form-wrap h3 { margin: 0 0 20px; font-size: 20px; }

.reels-source-toggle { display: flex; gap: 8px; margin-bottom: 20px; }
.reels-src-btn {
    flex: 1; padding: 10px; border-radius: 10px; border: 2px solid #ddd;
    background: transparent; cursor: pointer; font-size: 14px; font-weight: 600;
}
.reels-src-btn.active { background: #111; color: #fff; border-color: #111; }
body.night-mode .reels-src-btn { border-color: #444; color: #ccc; }
body.night-mode .reels-src-btn.active { background: #fff; color: #111; border-color: #fff; }

.reels-form-wrap label {
    display: block; font-size: 13px; font-weight: 600; margin: 14px 0 5px;
}
.reels-hint { font-weight: 400; opacity: .6; font-size: 12px; }

.reels-form-wrap input[type="text"],
.reels-form-wrap input[type="url"],
.reels-form-wrap input[type="number"],
.reels-form-wrap textarea {
    width: 100%; padding: 10px 12px; border-radius: 8px;
    border: 1.5px solid #ddd; font-size: 14px; box-sizing: border-box;
    background: #fff; color: #111;
}
body.night-mode .reels-form-wrap input,
body.night-mode .reels-form-wrap textarea { background: #2a2a2a; border-color: #444; color: #eee; }

.reels-form-wrap input[type="file"] { padding: 8px 0; border: none; }

.reels-form-row { display: flex; gap: 20px; margin-top: 14px; }
.reels-form-row > div { flex: 1; display:none;}
.reels-small-input { width: 100px !important; }

.reels-toggle { display: flex; align-items: center; gap: 8px; font-weight: 400 !important; margin-top: 8px; }
.reels-toggle input { width: auto !important; }

/* Progress bar */
.reels-progress-bar {
    height: 6px; background: #ddd; border-radius: 3px; margin: 10px 0 4px; overflow: hidden;
}
.reels-progress-fill { height: 100%; background: #e91e8c; width: 0; transition: width .2s; }
.reels-progress-pct { font-size: 12px; opacity: .7; }

.reels-error { color: #c00; font-size: 13px; margin: 10px 0; padding: 8px 12px; background: #fff0f0; border-radius: 6px; }

.reels-btn-primary {
    margin-top: 20px; width: 100%; padding: 12px; border-radius: 10px;
    background: #e91e8c; color: #fff; border: none; font-size: 15px;
    font-weight: 700; cursor: pointer; transition: opacity .2s;
}
.reels-btn-primary:hover { opacity: .85; }
.reels-btn-primary:disabled { opacity: .5; cursor: not-allowed; }

/* ── Modal ─────────────────────────────────────────────────────────────────── */
#reels-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; }
.reels-modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.85); }
.reels-modal-inner {
    position: relative; z-index: 1;
    width: 95vw; max-width: 700px; max-height: 92vh;
    background: #111; border-radius: 16px; overflow: hidden;
    display: flex; flex-direction: column;
}
.reels-modal-video-wrap {
    flex: 1; background: #000; display: flex; align-items: center; justify-content: center;
    min-height: 300px;
}
.reels-modal-video-wrap video,
.reels-modal-video-wrap iframe {
    width: 100%; max-height: 70vh; object-fit: contain; display: block; border: none;
}
.reels-modal-locked {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; font-size: 18px; gap: 10px; opacity: .7; padding: 40px;
}
/* Bottom bar */
.reels-modal-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: #1a1a1a; gap: 12px; flex-shrink: 0;
}
.reels-modal-info { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.reels-modal-title { font-size: 15px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reels-modal-author { font-size: 12px; color: rgba(255,255,255,.55); cursor: pointer; }
.reels-modal-author:hover { color: #fff; text-decoration: underline; }
.reels-modal-desc { font-size: 12px; color: rgba(255,255,255,.7); margin-top: 3px; }
.reels-modal-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.reels-modal-close {
    position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.5);
    border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; font-size: 16px; z-index: 2;
}
.reels-view-count { font-size: 13px; color: rgba(255,255,255,.7); }

.reels-love-btn {
    padding: 8px 16px; border-radius: 20px; border: 1.5px solid rgba(255,255,255,.3);
    background: transparent; color: #fff; cursor: pointer; font-size: 13px; font-weight: 600;
    transition: all .2s;
}
.reels-love-btn:hover { background: rgba(255,255,255,.15); }
.reels-love-btn.loved { background: #e91e8c; border-color: #e91e8c; }

/* Empty state */
.reels-empty { text-align: center; padding: 60px 20px; opacity: .5; font-size: 15px; }

/* Author filter bar */
.reels-author-filter {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
    font-size: 13px; color: #555;
}
body.night-mode .reels-author-filter { color: #aaa; }
#reels-filter-clear {
    padding: 3px 10px; border-radius: 12px; border: 1.5px solid #ddd;
    background: transparent; cursor: pointer; font-size: 12px;
}
#reels-filter-clear:hover { background: #111; color: #fff; border-color: #111; }
body.night-mode #reels-filter-clear { border-color: #555; color: #ccc; }

.reels-tip-btn {
    display:none !important;
}

/* ── Reels Slider Shortcode ─────────────────────────────────────────────── */
.rslider-wrap { width: 100%; }

.rslider-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.rslider-title {
    font-size: 15px; font-weight: 700; text-decoration: none; color: inherit;
}
.rslider-title:hover { text-decoration: underline; }
body.night-mode .rslider-title { color: #eee; }

.rslider-arrows { display: flex; gap: 6px; }
.rslider-arrows button {
    width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid #999;
    background: transparent; color: #999; cursor: pointer; font-size: 18px; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .2s, color .2s;
}
.rslider-arrows button:hover { border-color: #666; color: #666; }
body.night-mode .rslider-arrows button { border-color: #666; color: #666; }
body.night-mode .rslider-arrows button:hover { border-color: #aaa; color: #aaa; }

.rslider-track-wrap { overflow: hidden; }
.rslider-track {
    display: flex; gap: 8px;
    will-change: transform;
}
.rslider-track::-webkit-scrollbar { display: none; }

.rslider-item {
    flex: 0 0 100px; width: 100px; height: 90px;
    border-radius: 8px; overflow: hidden; position: relative;
    display: block; text-decoration: none; background: #222;
}
.rslider-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.rslider-noimg {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; font-size: 22px; color: #fff;
}
.rslider-item-title {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.6); color: #fff; font-size: 10px;
    padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
