/* ── Overlay ────────────────────────────────────────────── */

#smd-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: smdFadeIn 0.25s ease;
    padding: 20px;
    box-sizing: border-box;
}

/* ── Modal ──────────────────────────────────────────────── */

#smd-modal {
    background: #1a1a1a;
    color: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 32px 28px 24px;
    position: relative;
    animation: smdSlideUp 0.3s ease;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Close button ───────────────────────────────────────── */

#smd-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
}

#smd-close:hover {
    color: #fff;
}

/* ── Header ─────────────────────────────────────────────── */

#smd-header {
    text-align: center;
    margin-bottom: 16px;
}

#smd-icon {
    font-size: 32px;
    margin-bottom: 8px;
    color: #ff8c00;
}

#smd-status {
    font-size: 16px;
    font-weight: 600;
    color: #ff8c00;
    margin-bottom: 6px;
}

#smd-filename {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

#smd-count {
    font-size: 13px;
    color: #999;
}

/* ── Divider ────────────────────────────────────────────── */

#smd-divider {
    height: 1px;
    background: #333;
    margin: 16px 0;
}

/* ── Form ───────────────────────────────────────────────── */

#smd-subtitle {
    text-align: center;
    color: #ccc;
    font-size: 13px;
    margin: 0 0 16px;
}

#smd-form label {
    display: block;
    font-size: 12px;
    color: #aaa;
    margin-bottom: 4px;
    font-weight: 500;
}

#smd-form .smd-req {
    color: #ff8c00;
}

#smd-form input[type="text"],
#smd-form input[type="email"] {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    margin-bottom: 12px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

#smd-form input:focus {
    border-color: #ff8c00;
}

#smd-form input::placeholder {
    color: #666;
}

/* ── Submit button ──────────────────────────────────────── */

#smd-submit {
    display: block;
    width: 100%;
    padding: 12px;
    background: #ff8c00;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.2s, opacity 0.2s;
    font-family: inherit;
}

#smd-submit:hover:not(:disabled) {
    background: #e67e00;
}

#smd-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Skip / No thanks ───────────────────────────────────── */

#smd-skip {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    padding: 12px 0 0;
    transition: color 0.2s;
    font-family: inherit;
}

#smd-skip:hover {
    color: #ccc;
}

/* ── Thank you ──────────────────────────────────────────── */

#smd-thanks {
    text-align: center;
    padding: 24px 0 12px;
}

#smd-thanks-icon {
    font-size: 48px;
    color: #4caf50;
    margin-bottom: 12px;
}

#smd-thanks-text {
    font-size: 16px;
    font-weight: 600;
}

/* ── Animations ─────────────────────────────────────────── */

@keyframes smdFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes smdSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Tablet ─────────────────────────────────────────────── */

@media (max-width: 768px) {
    #smd-modal {
        max-width: 90%;
    }
}

/* ── Mobile (bottom sheet) ──────────────────────────────── */

@media (max-width: 480px) {
    #smd-overlay {
        align-items: flex-end;
        padding: 0;
    }

    #smd-modal {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 28px 20px 24px;
        animation: smdSlideUpMobile 0.3s ease;
    }

    @keyframes smdSlideUpMobile {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }
}
