/**
 * File Path: assets/css/mbs-admin-settings-shortcodes.css
 * Blocks & Shortcodes tab styles; loaded when the Shortcodes tab is active.
 * @package MyBookShowroom
 * @since   1.0.0
 */

/* Tab wrapper */
.mbs-tab-shortcodes {
    max-width: 1100px;
    padding-top: 12px;
}

/* ----- Section intro text ----------------------------------------- */
.mbs-tab-shortcodes .mbs-ref-intro {
    margin: 0 0 14px;
    color: #50575e;
    font-size: 13px;
    line-height: 1.6;
}

/* ----- Individual shortcode / block entry -------------------------- */
.mbs-ref-entry {
    padding: 4px 0 20px;
}
.mbs-ref-entry:last-child {
    padding-bottom: 0;
}

/* ----- Entry header: tag + alias/block-name row -------------------- */
.mbs-ref-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.mbs-ref-tag {
    display: inline-block;
    background: #1d2327;
    color: #f0f0f0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.mbs-ref-alias {
    font-size: 12px;
    color: #646970;
    font-style: italic;
}

.mbs-ref-block-name {
    font-size: 12px;
    color: #646970;
    font-family: Consolas, "Courier New", monospace;
    background: #f0f0f1;
    padding: 2px 7px;
    border-radius: 3px;
}

/* ----- Coming Soon badge ------------------------------------------- */
.mbs-ref-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.mbs-ref-badge--soon {
    background: #fcf0c1;
    color: #8a6700;
    border: 1px solid #f0d000;
}

/* ----- Description text -------------------------------------------- */
.mbs-ref-desc {
    margin: 0 0 14px;
    color: #3c434a;
    font-size: 13px;
    line-height: 1.6;
}

/* ----- Required asterisk ------------------------------------------- */
.mbs-required {
    color: var(--mbs-status-err);
    font-weight: 700;
}

/* ----- Builder form ------------------------------------------------ */
.mbs-builder {
    margin: 0;
}

.mbs-builder-fields {
    margin-bottom: 10px;
}

/* Each row is a flex group of fields */
.mbs-builder-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 10px;
}
.mbs-builder-row:last-child {
    margin-bottom: 0;
}

/* Individual field: label + control stacked */
.mbs-builder-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.mbs-builder-field label {
    font-size: 12px;
    font-weight: 600;
    color: #1d2327;
    white-space: nowrap;
}

.mbs-builder-field input[type="text"],
.mbs-builder-field input[type="number"],
.mbs-builder-field select {
    font-size: 13px;
    padding: 4px 6px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    background: #fff;
    color: #1d2327;
    min-width: 0;
}

.mbs-builder-field input[type="number"] {
    width: 80px;
}

.mbs-builder-field select {
    min-width: 140px;
}

/* ----- Live preview bar -------------------------------------------- */
.mbs-builder-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f6fc;
    border: 1px solid #c3d9f0;
    border-radius: 4px;
    padding: 10px 14px;
    margin-top: 12px;
}

/* Static preview (no builder form — e.g. [mbs_search]) */
.mbs-builder-preview--static {
    background: #f6f7f7;
    border-color: #dcdcde;
}

.mbs-builder-output {
    flex: 1;
    min-width: 0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    color: #0a3a5c;
    word-break: break-all;
    background: none;
    padding: 0;
    white-space: pre-wrap;
}

/* Block output is typically longer — slightly smaller font */
[data-block] .mbs-builder-output {
    font-size: 12px;
    color: #3c434a;
}

.mbs-copy-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── Add-to-Pages dismissible callout ───────────────────────────────────── */

.mbs-add-to-pages-callout {
    position: relative;
    margin-bottom: 20px;
    padding: 14px 40px 14px 16px;
    background: #f0f6fc;
    border-left: 4px solid var(--mbs-status-info);
    border-radius: 2px;
}

.mbs-add-to-pages-callout p {
    margin: 0 0 8px;
    color: #1d2327;
}

.mbs-add-to-pages-callout p:last-child {
    margin-bottom: 0;
}

.mbs-add-to-pages-callout ol {
    margin: 0 0 10px 20px;
}

.mbs-add-to-pages-callout ol li {
    margin-bottom: 4px;
    color: #1d2327;
}

.mbs-add-to-pages-callout .mbs-callout-tip {
    font-size: 12px;
    color: #50575e;
    border-top: 1px solid #c3d9f0;
    padding-top: 8px;
    margin-top: 8px;
}

.mbs-callout-dismiss {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: #50575e;
    padding: 0;
}

.mbs-callout-dismiss:hover {
    color: #1d2327;
}
