/* GravityOps Search — Shortcode Builder */

#gospb-app {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
    margin-top: 12px;
}

.gospb-main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gospb-side {
    position: sticky;
    top: 40px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gospb-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 14px 16px;
}

.gospb-card h2 {
    margin: 0 0 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #1d2327;
}

.gospb-card h2 .gospb-help {
    float: right;
    font-size: 11px;
    color: #646970;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.gospb-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px;
}

.gospb-row label {
    font-weight: 600;
    color: #1d2327;
}

.gospb-row select, .gospb-row input[type=text], .gospb-row input[type=number] {
    width: 100%;
}

.gospb-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.gospb-inline > * {
    flex: 0 0 auto;
}

.gospb-search-row {
    display: grid;
    grid-template-columns: 30px 80px 1fr 100px 1fr 60px;
    gap: 6px;
    align-items: start;
    margin-bottom: 6px;
    padding: 8px;
    background: #f6f7f7;
    border-radius: 3px;
}

.gospb-search-row .gospb-handle {
    cursor: grab;
    user-select: none;
    text-align: center;
    padding-top: 6px;
    color: #8c8f94;
}

.gospb-search-row select, .gospb-search-row input {
    width: 100%;
}

.gospb-btn {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    padding: 4px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.gospb-btn:hover {
    background: #fff;
}

.gospb-btn-danger {
    color: #b32d2e;
}

.gospb-btn-primary {
    background: #975BE5;
    color: #fff;
    border-color: #975BE5;
}

.gospb-btn-primary:hover {
    background: #7F3FD6;
    border-color: #7F3FD6;
}

.gospb-tag {
    display: inline-block;
    background: #975BE5;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-right: 4px;
}

.gospb-mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
    border-bottom: 1px solid #c3c4c7;
}

.gospb-mode-tabs button {
    background: transparent;
    border: 0;
    padding: 8px 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 13px;
}

.gospb-mode-tabs button.active {
    border-bottom-color: #975BE5;
    color: #975BE5;
    font-weight: 600;
}

.gospb-block-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: #f6f7f7;
    border-radius: 3px;
    min-height: 60px;
}

.gospb-block {
    display: grid;
    grid-template-columns: 22px 80px 1fr 60px;
    gap: 6px;
    align-items: center;
    background: #fff;
    padding: 6px 8px;
    border: 1px solid #dcdcde;
    border-radius: 3px;
}

.gospb-block .gospb-handle {
    cursor: grab;
    color: #8c8f94;
}

.gospb-block-type {
    font-weight: 600;
    font-size: 11px;
    color: #50575e;
    text-transform: uppercase;
}

.gospb-block input[type=text], .gospb-block select {
    width: 100%;
}

.gospb-block-children {
    grid-column: 1 / -1;
    padding-left: 30px;
    padding-top: 6px;
}

.gospb-add-block {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.gospb-preview {
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 12px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 240px;
    overflow-y: auto;
}

.gospb-warnings {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gospb-warn {
    padding: 6px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.gospb-warn.info {
    background: #e7f5fa;
    border-left: 3px solid #5F6EEA;
}

.gospb-warn.warn {
    background: #fcf9e8;
    border-left: 3px solid #dba617;
}

.gospb-warn.error {
    background: #fcf0f1;
    border-left: 3px solid #b32d2e;
}

.gospb-test-out {
    background: #f6f7f7;
    padding: 10px;
    border-radius: 3px;
    min-height: 30px;
}

.gospb-pill {
    display: inline-block;
    background: #dcdcde;
    color: #1d2327;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 11px;
    margin-left: 4px;
}

.gospb-empty {
    color: #8c8f94;
    font-style: italic;
    padding: 8px;
    text-align: center;
}

.gospb-collapsible summary {
    cursor: pointer;
    font-weight: 600;
    padding: 4px 0;
}

.gospb-multi-checks {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
    background: #f6f7f7;
    border-radius: 3px;
}

.gospb-multi-checks label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gospb-selected-forms {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
}

.gospb-selected-forms__label {
    font-size: 11px;
    font-weight: 600;
    color: #50575e;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.gospb-form-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: #f6f7f7;
    border-radius: 3px;
}

.gospb-form-chip--primary {
    background: #F8F5FF;
    border-left: 3px solid #975BE5;
    padding-left: 6px;
}

.gospb-form-chip__star {
    color: #dba617;
    font-size: 14px;
    line-height: 1;
}

.gospb-form-chip__title {
    flex: 1;
    font-weight: 500;
    color: #1d2327;
}

.gospb-form-chip__role {
    font-size: 10px;
    font-weight: 700;
    color: #975BE5;
    text-transform: uppercase;
    letter-spacing: .05em;
    padding: 1px 6px;
    background: #fff;
    border: 1px solid #975BE5;
    border-radius: 8px;
}

.gospb-form-chip__action {
    font-size: 11px;
    padding: 2px 6px;
}

/* Saved Shortcodes tab */
.gospb-saved-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gospb-saved-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 14px 16px;
}

.gospb-saved-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gospb-saved-code {
    display: block;
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    border-radius: 3px;
    padding: 8px 12px;
    cursor: pointer;
    white-space: pre-wrap;
    word-break: break-all;
    margin-bottom: 8px;
    transition: background 0.15s, color 0.15s;
}

.gospb-saved-code:hover {
    background: #f0f0f1;
}

.gospb-saved-code.gospb-copied {
    background: #99D328;
    color: #fff;
    border-color: #99D328;
}

.gospb-saved-actions {
    display: flex;
    gap: 6px;
}

@media (max-width: 1100px) {
    #gospb-app {
        grid-template-columns: 1fr;
    }

    .gospb-side {
        position: static;
    }
}
