/**
 * Alkalois Custom — Drone Gallery stylesheet
 * ==========================================
 * 1. Wrap & strip outer (scrollbars, fondus)
 * 2. Film strip & perforations (alois-drone-holes, frames)
 * 3. Video zone (thumb, iframe, overlay, hover catcher)
 * 4. Frame infos & load-more
 * 5. Manage button & loading
 * 6. Popup lightbox
 * 7. Drawer manager (admin)
 * 8. Responsive (media queries)
 */


/* =============================================
   1. Wrap & strip outer
   ============================================= */

.alois-drone-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
}

.alois-drone-strip-outer {
    width: 100%;
    max-width: 900px;
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #222 #0a0a0a;
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent   0%,
        #111013      12%,
        #111013      88%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        transparent   0%,
        #111013      12%,
        #111013      88%,
        transparent 100%
    );
}

.alois-drone-strip-outer::-webkit-scrollbar { width: 4px; }
.alois-drone-strip-outer::-webkit-scrollbar-track { background: #0a0a0a; }
.alois-drone-strip-outer::-webkit-scrollbar-thumb { background: #222; border-radius: 2px; }


/* =============================================
   2. Film strip & perforations
   ============================================= */

.alois-drone-strip {
    display: flex;
    flex-direction: row;
    width: 100%;
    background: #0a0a0a;
}

.alois-drone-holes {
    width: 58px;
    flex-shrink: 0;
    background-color: #070707;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='58' height='64'%3E%3Crect x='13' y='14' width='32' height='22' rx='5' fill='%23141414' stroke='%231e1e1e' stroke-width='1.5'/%3E%3C/svg%3E");
    background-size: 58px 64px;
    background-repeat: repeat-y;
}

.alois-drone-holes-l { border-right: 3px solid #111; }
.alois-drone-holes-r { border-left:  3px solid #111; }

.alois-drone-frames {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.alois-drone-frame {
    position: relative;
    background: #0c0c0c;
    border-bottom: 4px solid #070707;
    border-top: 2px solid #141414;
}

.alois-drone-frame:first-child { border-top: none; }
.alois-drone-frame:last-child  { border-bottom: none; }

.alois-drone-frame-num {
    position: absolute;
    top: 9px;
    left: 12px;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 3px;
    color: #252525;
    z-index: 4;
    user-select: none;
    pointer-events: none;
}


/* =============================================
   3. Video zone
   ============================================= */

.alois-drone-video-zone {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #000;
}

.alois-drone-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity .5s ease, transform .6s ease;
    z-index: 1;
    pointer-events: none;
}

.alois-drone-video-zone.is-hovered .alois-drone-thumb {
    opacity: 0;
    transform: scale(1.04);
}

.alois-drone-iframe-slot {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.alois-drone-iframe-slot iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    pointer-events: none;
}

.alois-drone-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 2;
    transition: opacity .35s ease;
    background: linear-gradient(to bottom, rgba(0,0,0,.1) 0%, rgba(0,0,0,.45) 100%);
    pointer-events: none;
}

.alois-drone-video-zone.is-hovered .alois-drone-overlay { opacity: 0; }

.alois-drone-play-hint svg {
    filter: drop-shadow(0 2px 14px rgba(0,0,0,.7));
    transition: transform .25s;
}

.alois-drone-video-zone:hover .alois-drone-play-hint svg {
    transform: scale(1.1);
}

.alois-drone-hover-hint {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,.45);
    font-family: 'Courier New', monospace;
    text-shadow: 0 1px 6px rgba(0,0,0,.9);
}

.alois-drone-hover-catcher {
    position: absolute;
    inset: 0;
    z-index: 10;
    cursor: pointer;
    background: transparent;
}


/* =============================================
   4. Frame infos & load-more
   ============================================= */

.alois-drone-frame-info {
    display: none;
}

.alois-drone-frame-num-label {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 9px;
    letter-spacing: 3px;
    color: #2a2a2a;
    margin-bottom: 5px;
}

.alois-drone-frame-title {
    font-size: 13px;
    font-weight: 500;
    color: #bbb;
    margin: 0 0 3px;
    letter-spacing: .4px;
}

.alois-drone-frame-desc {
    font-size: 11px;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.alois-drone-load-more-wrap {
    width: 100%;
    max-width: 900px;
    background: #070707;
    border-top: 2px solid #111;
}

.alois-drone-load-more {
    width: 100%;
    padding: 14px;
    background: none;
    border: none;
    color: #3a3a3a;
    font-size: 10px;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: color .2s;
}

.alois-drone-load-more:hover { color: #999; }


/* =============================================
   5. Manage button & loading
   ============================================= */

.alois-drone-manage-btn {
    margin-top: 18px;
    background: none;
    border: 1px solid #252525;
    color: #4a4a4a;
    padding: 8px 20px;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.alois-drone-manage-btn:hover {
    border-color: #aaa;
    color: #ccc;
}

.alois-drone-loading {
    color: #2a2a2a;
    font-size: 11px;
    letter-spacing: 3px;
    text-align: center;
    padding: 50px;
    font-family: 'Courier New', monospace;
}


/* =============================================
   6. Popup lightbox
   ============================================= */

.alois-drone-popup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.alois-drone-popup.open { display: flex; }

.alois-drone-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.94);
    cursor: pointer;
}

.alois-drone-popup-content {
    position: relative;
    z-index: 1;
    width: 88vw;
    max-width: 980px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.alois-drone-popup-close {
    position: absolute;
    top: -46px;
    right: 0;
    background: none;
    border: none;
    color: #888;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    transition: color .2s;
}

.alois-drone-popup-close:hover { color: #fff; }

.alois-drone-popup-iframe-wrap {
    width: 100%;
    aspect-ratio: 16/9;
    background: #000;
}

.alois-drone-popup-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}

.alois-drone-popup-info { text-align: center; }
.alois-drone-popup-info h3 { font-size: 14px; color: #ddd; margin: 0 0 4px; }
.alois-drone-popup-info p  { font-size: 12px; color: #666; margin: 0; }

.alois-drone-popup-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 2px;
    transition: background .2s, opacity .2s;
    z-index: 2;
}

.alois-drone-popup-nav:hover { background: rgba(255,255,255,.2); }
.alois-drone-popup-nav.disabled {
    opacity: .12;
    cursor: not-allowed;
    pointer-events: none;
}

#alois-drone-popup-prev { left: -60px; }
#alois-drone-popup-next { right: -60px; }


/* =============================================
   7. Drawer manager (admin)
   ============================================= */

.alois-drone-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99998;
}

.alois-drone-drawer.open { display: block; }

.alois-drone-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
    cursor: pointer;
}

.alois-drone-drawer-panel {
    position: absolute;
    right: 0;
    top: 118px;
    bottom: 0;
    width: 380px;
    max-width: 100vw;
    background: #111;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,.6);
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow: hidden;
}

.alois-drone-drawer.open .alois-drone-drawer-panel {
    transform: translateX(0);
}

.alois-drone-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.alois-drone-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.alois-drone-drawer-title {
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #777;
}

.alois-drone-drawer-close {
    background: none;
    border: none;
    color: #555;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: color .2s;
}

.alois-drone-drawer-close:hover { color: #fff; }

.alois-drone-back-btn {
    background: none;
    border: 1px solid #2a2a2a;
    color: #666;
    font-size: 10px;
    padding: 5px 12px;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: inherit;
    transition: all .2s;
}

.alois-drone-back-btn:hover {
    border-color: #aaa;
    color: #ccc;
}

.alois-drone-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.alois-drone-drawer-footer {
    padding: 14px 16px;
    border-top: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.alois-drone-drawer-add-btn {
    width: 100%;
    padding: 12px;
    background: none;
    border: 1px solid #2a2a2a;
    color: #666;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
}

.alois-drone-drawer-add-btn:hover {
    border-color: #aaa;
    color: #ccc;
}

.alois-drone-mgr-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 8px;
}

.alois-drone-mgr-item { background: #1a1a1a; }

.alois-drone-mgr-thumb-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #0a0a0a;
}

.alois-drone-mgr-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.alois-drone-mgr-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    background: rgba(0,0,0,.35);
    transition: background .2s;
}

.alois-drone-mgr-item:hover .alois-drone-mgr-play {
    background: rgba(0,0,0,.55);
}

.alois-drone-mgr-actions {
    display: flex;
    gap: 6px;
    padding: 6px;
}

.alois-drone-mgr-actions button {
    flex: 1;
    padding: 6px;
    background: none;
    border: 1px solid #222;
    color: #666;
    cursor: pointer;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}

.alois-drone-mgr-actions button:hover {
    border-color: #aaa;
    color: #ccc;
}

.alois-drone-field { margin-bottom: 14px; }

.alois-drone-field label {
    display: block;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 6px;
}

.alois-drone-field input,
.alois-drone-field textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #252525;
    color: #eee;
    padding: 9px 12px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s;
    border-radius: 0;
    box-sizing: border-box;
    resize: none;
}

.alois-drone-field input:focus,
.alois-drone-field textarea:focus {
    border-color: #aaa;
}

.alois-drone-form-msg {
    display: none;
    padding: 10px 12px;
    font-size: 12px;
    margin-bottom: 12px;
}

.alois-drone-form-msg.success {
    background: rgba(50,180,100,.1);
    color: #6c9;
    border: 1px solid rgba(50,180,100,.2);
}

.alois-drone-form-msg.error {
    background: rgba(220,80,60,.1);
    color: #f97;
    border: 1px solid rgba(220,80,60,.2);
}

.alois-drone-submit-btn {
    width: 100%;
    padding: 12px;
    background: none;
    border: 1px solid #999;
    color: #bbb;
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
}

.alois-drone-submit-btn:hover {
    background: rgba(255,255,255,.05);
    border-color: #fff;
    color: #fff;
}

.alois-drone-empty-msg {
    color: #333;
    font-size: 11px;
    text-align: center;
    padding: 30px;
    font-family: 'Courier New', monospace;
}


/* =============================================
   8. Responsive
   ============================================= */

@media(max-width:768px) {
    #alois-drone-popup-prev { left: -44px; }
    #alois-drone-popup-next { right: -44px; }
    .alois-drone-popup-nav { width: 36px; height: 36px; }
    .alois-drone-popup-content { width: 94vw; }
    .alois-drone-holes {
        width: 24px;
        background-size: 80% 34px;
        background-position: center;
    }
}
