/* CONTAINER ADMIN */
.sos-promo-wrap {
    max-width: 880px;
    margin-top: 20px;
    background: #ffffff;
    padding: 25px 30px 30px;
    border-radius: 14px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

.sos-promo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.sos-promo-subtitle {
    margin-top: 4px;
    color: #555;
    font-size: 13px;
}

.sos-promo-dark-toggle .dashicons {
    margin-right: 4px;
}

/* TABS */
.sos-promo-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 10px 0 18px;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 4px;
}

.sos-tab-button {
    border: none;
    background: transparent;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    color: #555;
}

.sos-tab-button.active {
    background: #4c8bf5;
    color: #fff;
}

/* PANELS */
.sos-tab-panel {
    display: none;
}

.sos-tab-panel.active {
    display: block;
}

/* FIELDS */
.sos-field-group {
    margin-bottom: 18px;
}

.sos-field-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
}

.sos-field-group input[type="text"],
.sos-field-group input[type="number"],
.sos-field-group input[type="date"],
.sos-field-group input[type="color"],
.sos-field-group select,
.sos-shortcode-output,
.sos-field-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid #d0d0d0;
    box-sizing: border-box;
}

.sos-field-description {
    font-size: 12px;
    color: #777;
    margin-top: 3px;
}

.sos-divider {
    height: 1px;
    background: #ececec;
    margin: 22px 0;
}

/* GRID */
.sos-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* CHECKBOX INLINE */
.sos-field-checkbox input[type="checkbox"] {
    margin-right: 6px;
}

/* SUBMIT */
.sos-submit-row {
    margin-top: 20px;
}

#sos_promo_submit.button-hero {
    padding: 10px 24px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
}

/* BANNER CUPOM (front + preview) */
.sos-promo-label {
    display: inline-block;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #ffe8a3;
    color: #8a4b00;
}

.sos-promo-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff7e2;
    border: 1px dashed #f1c36b;
    margin: 12px 0;
}

.sos-promo-badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: #ffb347;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
}

.sos-promo-text {
    font-size: 14px;
    line-height: 1.4;
}

.sos-preview-title {
    margin-top: 0;
    font-size: 14px;
}

/* MODELOS */
.sos-templates-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0 5px;
}

/* SHORTCODE */
.sos-shortcode-output {
    resize: none;
    font-family: Menlo,Consolas,monospace;
}

.sos-shortcode-copy {
    margin-top: 6px;
}

/* ALERTA PREVIEW (apenas admin) */
.sos-alert-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #111827;
    color: #f9fafb;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #facc15;
    margin-top: 10px;
}

.sos-alert-preview .sos-alert-text {
    flex: 1;
    font-size: 13px;
}

.sos-alert-preview .sos-alert-cta {
    background: #facc15;
    border-color: #facc15;
    color: #111827;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
}

.sos-alert-preview .sos-alert-close {
    background: transparent;
    border: none;
    color: #f9fafb;
    font-size: 18px;
    line-height: 1;
    cursor: default;
}

/* DARK MODE ADMIN */
.sos-promo-wrap.sos-promo-dark {
    background: #111827;
    border-color: #1f2937;
    color: #e5e7eb;
}

.sos-promo-wrap.sos-promo-dark .sos-promo-subtitle {
    color: #9ca3af;
}

.sos-promo-wrap.sos-promo-dark .sos-tab-button {
    color: #e5e7eb;
}

.sos-promo-wrap.sos-promo-dark .sos-tab-button.active {
    background: #2563eb;
}

.sos-promo-wrap.sos-promo-dark input[type="text"],
.sos-promo-wrap.sos-promo-dark input[type="number"],
.sos-promo-wrap.sos-promo-dark input[type="date"],
.sos-promo-wrap.sos-promo-dark input[type="color"],
.sos-promo-wrap.sos-promo-dark select,
.sos-promo-wrap.sos-promo-dark .sos-shortcode-output,
.sos-promo-wrap.sos-promo-dark textarea {
    background: #020617;
    border-color: #4b5563;
    color: #e5e7eb;
}

.sos-promo-wrap.sos-promo-dark .sos-field-description {
    color: #9ca3af;
}

.sos-promo-wrap.sos-promo-dark .sos-divider {
    background: #1f2937;
}

.sos-promo-wrap.sos-promo-dark .sos-promo-banner {
    background: #020617;
    border-color: #374151;
}

.sos-promo-wrap.sos-promo-dark .sos-promo-badge {
    background: #f97316;
}

/* ALERTA GLOBAL (front-end) */
.sos-alert-global {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9999;
    pointer-events: none;
}

.sos-alert-top {
    top: 0;
}

.sos-alert-bottom {
    bottom: 0;
}

.sos-alert-floating {
    width: 320px;
    max-width: 95%;
    pointer-events: none;
}

.sos-alert-left {
    left: 10px;
    bottom: 20px;
}

.sos-alert-right {
    right: 10px;
    bottom: 20px;
}

.sos-alert-inner {
    margin: 8px auto;
    max-width: 1180px;
    border-radius: 999px;
    padding: 10px 14px;
    border-width: 1px;
    border-style: solid;
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    box-shadow: 0 10px 25px rgba(0,0,0,.18);
}

.sos-alert-global.sos-alert-floating .sos-alert-inner {
    border-radius: 12px;
}

.sos-alert-text {
    font-size: 13px;
    flex: 1;
}

.sos-alert-cta {
    background: #facc15;
    border: 1px solid #facc15;
    color: #111827;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.sos-alert-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

/* MOBILE */
@media (max-width: 768px) {
    .sos-grid-2 {
        grid-template-columns: 1fr;
    }

    .sos-promo-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sos-promo-wrap {
        padding: 18px 16px 22px;
    }

    .sos-alert-inner {
        border-radius: 0;
        margin: 0;
        max-width: 100%;
    }

    .sos-alert-floating {
        left: 0 !important;
        right: 0 !important;
        width: 100%;
    }

    .sos-alert-left,
    .sos-alert-right {
        bottom: 0;
    }
}
