/* =========================================================
   Rank Bix SEO – FAQ & HowTo block styles
   Editor + frontend (single shared file)
   ========================================================= */

/* ----------------------------------------------------------
   Shared block header (editor only)
   ---------------------------------------------------------- */
.rbx-block-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.rbx-block-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
}

.rbx-block-badge--faq   { background: #2271b1; }
.rbx-block-badge--howto { background: #1d8348; }

.rbx-block-hint {
    font-size: 12px;
    color: #888;
}

/* ----------------------------------------------------------
   FAQ block – editor
   ---------------------------------------------------------- */
.rbx-faq-editor {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 16px;
    background: #fafafa;
}

.rbx-faq-row {
    border: 1px solid #dde3e9;
    border-radius: 5px;
    background: #fff;
    padding: 12px 14px;
    margin-bottom: 10px;
    position: relative;
}

.rbx-faq-row-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rbx-faq-index {
    font-size: 11px;
    font-weight: 700;
    color: #2271b1;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.rbx-faq-remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #c0392b;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
    border-radius: 3px;
    opacity: .7;
}
.rbx-faq-remove:hover { opacity: 1; background: #fdf2f2; }

.rbx-faq-question.rich-text,
.rbx-faq-question [contenteditable] {
    font-weight: 600;
    font-size: 14px;
    color: #1e2432;
    border-bottom: 1px dashed #e0e5ec;
    margin-bottom: 8px;
    padding-bottom: 6px;
    min-height: 28px;
}

.rbx-faq-answer.rich-text,
.rbx-faq-answer [contenteditable] {
    font-size: 13px;
    color: #444;
    min-height: 40px;
}

/* ----------------------------------------------------------
   HowTo block – editor
   ---------------------------------------------------------- */
.rbx-howto-editor {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px 16px;
    background: #fafafa;
}

.rbx-howto-title-row,
.rbx-howto-time-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.rbx-howto-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    min-width: 140px;
}

.rbx-howto-title-input,
.rbx-howto-time-input {
    flex: 1;
    border: 1px solid #dde3e9;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
    background: #fff;
}
.rbx-howto-title-input:focus,
.rbx-howto-time-input:focus {
    border-color: #2271b1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, .15);
}

.rbx-howto-step-row {
    border: 1px solid #dde3e9;
    border-radius: 5px;
    background: #fff;
    padding: 12px 14px;
    margin-bottom: 10px;
    position: relative;
}

.rbx-howto-step-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.rbx-howto-step-num {
    font-size: 11px;
    font-weight: 700;
    color: #1d8348;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.rbx-howto-step-name {
    font-weight: 600;
    font-size: 13px;
    border: 1px solid #e0e5ec;
    border-radius: 4px;
    padding: 5px 9px;
    margin-bottom: 8px;
    width: 100%;
    box-sizing: border-box;
    background: #f8f9fa;
}
.rbx-howto-step-name:focus {
    border-color: #1d8348;
    outline: none;
    background: #fff;
}

.rbx-howto-step-desc.rich-text,
.rbx-howto-step-desc [contenteditable] {
    font-size: 13px;
    color: #444;
    min-height: 40px;
}

/* ----------------------------------------------------------
   Shared add button (editor)
   ---------------------------------------------------------- */
.rbx-block-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 6px 14px;
    background: #f0f6fc;
    border: 1px dashed #2271b1;
    border-radius: 4px;
    color: #2271b1;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.rbx-block-add-btn:hover { background: #e3eef8; }

/* ----------------------------------------------------------
   FAQ block – frontend
   ---------------------------------------------------------- */
.rankbix-seo-faq-block {
    margin: 1.5em 0;
}

.rankbix-seo-faq-list {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 2px solid #e8eaf0;
}

.rankbix-seo-faq-q {
    font-weight: 600;
    font-size: 1em;
    color: inherit;
    padding: 14px 0 6px;
    border-bottom: 1px solid #f0f2f5;
    margin: 0;
}

.rankbix-seo-faq-q::before {
    content: 'Q: ';
    color: #2271b1;
    font-weight: 700;
}

.rankbix-seo-faq-a {
    padding: 6px 0 14px;
    border-bottom: 1px solid #e8eaf0;
    margin: 0;
    color: #444;
    font-size: .97em;
    line-height: 1.65;
}

.rankbix-seo-faq-a p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------
   HowTo block – frontend
   ---------------------------------------------------------- */
.rankbix-seo-howto-block {
    margin: 1.5em 0;
}

.rankbix-seo-howto-title {
    font-size: 1.15em;
    margin: 0 0 .75em;
}

.rankbix-seo-howto-steps {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: howto-step;
}

.rankbix-seo-howto-step {
    counter-increment: howto-step;
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #e8eaf0;
}

.rankbix-seo-howto-step::before {
    content: counter(howto-step);
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    font-size: .8em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.rankbix-seo-howto-step-body {
    flex: 1;
}

.rankbix-seo-howto-step-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 1em;
}

.rankbix-seo-howto-step-desc {
    color: #555;
    font-size: .97em;
    line-height: 1.65;
}

.rankbix-seo-howto-step-desc p:last-child { margin-bottom: 0; }
