/* ════════════════════════════════════════════════════════
   Schmausenbuck Popup – Frontend Styles
   Version 1.0.0 | Digital Allies
════════════════════════════════════════════════════════ */

/* ── Popup Overlay ── */
.sbpop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.sbpop-overlay.is-visible {
    display: flex;
    animation: sbpop-fadein .25s ease;
}
@keyframes sbpop-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal ── */
.sbpop-modal {
    background: #111e11;
    border: 1px solid #243424;
    border-top: 3px solid #c8621a;
    border-radius: 8px;
    max-width: 580px;
    width: 100%;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    animation: sbpop-slidein .25s ease;
    overflow: hidden;
}
@keyframes sbpop-slidein {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

.sbpop-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 22px 14px;
    border-bottom: 1px solid #243424;
    flex-shrink: 0;
}
.sbpop-modal-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #dfe8cc;
    line-height: 1.3;
}
.sbpop-modal-x {
    background: none;
    border: none;
    color: #6a7e5a;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
    transition: color .15s, background .15s;
}
.sbpop-modal-x:hover {
    color: #dfe8cc;
    background: rgba(255,255,255,.08);
}

.sbpop-modal-body {
    padding: 18px 22px;
    color: #dfe8cc;
    font-size: .95rem;
    line-height: 1.65;
    overflow-y: auto;
    flex: 1 1 auto;
    -webkit-overflow-scrolling: touch;
}
.sbpop-modal-body p  { margin: 0 0 .8em; }
.sbpop-modal-body ul,
.sbpop-modal-body ol { margin: .4em 0 .8em 1.4em; }
.sbpop-modal-body strong { color: #fff; }
.sbpop-modal-body a  { color: #c8621a; }

.sbpop-modal-footer {
    padding: 14px 22px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid #243424;
    flex-shrink: 0;
}
.sbpop-close-btn {
    background: #c8621a;
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 4px;
    font-family: inherit;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s;
}
.sbpop-close-btn:hover { background: #b55718; }

.sbpop-modal-period {
    display: flex;
    gap: 14px;
    font-size: .75rem;
    color: #6a7e5a;
}

/* ════════════════════════════════════════════════════════
   Frontend Manager Shortcode
════════════════════════════════════════════════════════ */

.sbpop-mgr {
    background: #0e1a0e;
    border: 1px solid #243424;
    border-radius: 8px;
    overflow: hidden;
    font-family: inherit;
    margin: 0;
}

.sbpop-login-note {
    padding: 20px;
    color: #6a7e5a;
    margin: 0;
}

/* Notices */
.sbpop-notice {
    padding: 12px 18px;
    font-size: .88rem;
    border-left: 3px solid transparent;
}
.sbpop-notice--success {
    background: rgba(71,180,70,.12);
    border-color: #47b446;
    color: #a8e5a7;
}
.sbpop-notice--error {
    background: rgba(192,57,43,.12);
    border-color: #c0392b;
    color: #f4b0a8;
}

/* Header */
.sbpop-mgr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 16px 20px;
    background: #111e11;
    border-bottom: 1px solid #243424;
}
.sbpop-mgr-title {
    font-size: 1rem;
    font-weight: 700;
    color: #dfe8cc;
    letter-spacing: .04em;
}
.sbpop-badge {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}
.sbpop-badge--active   { background: rgba(71,180,70,.15);  color: #5eba47; border: 1px solid rgba(71,180,70,.3); }
.sbpop-badge--inactive { background: rgba(106,126,90,.12); color: #6a7e5a; border: 1px solid #243424; }
.sbpop-badge--scheduled{ background: rgba(200,98,26,.12);  color: #c8621a; border: 1px solid rgba(200,98,26,.3); }

/* Form */
.sbpop-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sbpop-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.sbpop-label {
    font-size: .73rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6a7e5a;
    font-weight: 600;
}
.sbpop-hint {
    font-size: .73rem;
    color: #4a5e3a;
}

.sbpop-input {
    background: #182418;
    border: 1px solid #2e3e2e;
    border-radius: 4px;
    padding: 9px 12px;
    color: #dfe8cc;
    font-family: inherit;
    font-size: .88rem;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .15s;
}
.sbpop-input:focus {
    outline: none;
    border-color: #c8621a;
    background: #1a2a1a;
}
/* Split date + time row */
.sbpop-datetime-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.sbpop-date-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}
.sbpop-input.sbpop-input--date {
    width: 110px;
    flex: 0 0 110px;
    border-radius: 4px 0 0 4px;
}
.sbpop-date-hidden {
    position: absolute;
    right: 0;
    top: 0;
    width: 36px;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}
.sbpop-date-btn {
    background: #2e3e2e;
    border: 1px solid #2e3e2e;
    border-left: none;
    border-radius: 0 4px 4px 0;
    padding: 8px 8px;
    font-size: .88rem;
    line-height: 1;
    flex-shrink: 0;
    pointer-events: none;
}
.sbpop-date-wrap:hover .sbpop-date-btn {
    background: #3e4e3e;
}
.sbpop-input.sbpop-input--time {
    width: 76px;
    flex: 0 0 76px;
    text-align: center;
    letter-spacing: .05em;
}

@media (max-width: 600px) {
    .sbpop-input.sbpop-input--date { flex: 1 1 auto; width: auto; }
}

/* Two-column row */
.sbpop-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) {
    .sbpop-field-row { grid-template-columns: 1fr; }
}

/* Toggle / Switch */
.sbpop-switch {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.sbpop-switch-input { display: none; }
.sbpop-switch-track {
    width: 46px;
    height: 24px;
    background: #2e3e2e;
    border-radius: 12px;
    position: relative;
    transition: background .2s;
    flex-shrink: 0;
}
.sbpop-switch-input:checked + .sbpop-switch-track { background: #c8621a; }
.sbpop-switch-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s;
}
.sbpop-switch-input:checked ~ .sbpop-switch-track .sbpop-switch-thumb { transform: translateX(22px); }
.sbpop-switch-text {
    font-size: .85rem;
    color: #dfe8cc;
    min-width: 50px;
}

/* Checkbox row */
.sbpop-check-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #dfe8cc;
    font-size: .88rem;
}
.sbpop-check-wrap input[type="checkbox"] {
    accent-color: #c8621a;
    width: 16px;
    height: 16px;
}

/* Editor wrap */
.sbpop-editor-wrap .wp-editor-container,
.sbpop-editor-wrap .wp-editor-wrap {
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #2e3e2e !important;
}

/* Actions */
.sbpop-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
    border-top: 1px solid #1e2e1e;
}
.sbpop-btn-save {
    background: #c8621a;
    color: #fff;
    border: none;
    padding: 11px 24px;
    border-radius: 4px;
    font-family: inherit;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s;
}
.sbpop-btn-save:hover { background: #b55718; }

.sbpop-btn-preview {
    color: #6a7e5a;
    font-size: .82rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #243424;
    padding: 10px 18px;
    border-radius: 4px;
    transition: color .2s, border-color .2s;
}
.sbpop-btn-preview:hover { color: #dfe8cc; border-color: #6a7e5a; }
