/* variables.css komt binnen via de tamrank-variables dependency (zie register_common_styles). */

/**
 * TAMRANK Meta Boxes - CSS Styling
 *
 * Extracted inline styles from admin/meta-boxes.php.
 * Sections: Tabs, Fields, Google Preview, Tooltips, Schema, Social, Floating Widget.
 *
 * @package TamRank
 * @since 7.0.0
 */

/* ========================================
   TAB NAVIGATION
   ======================================== */

.tam-meta-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.tam-meta-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tam-meta-tab:hover {
    color: #25AC75;
}

.tam-meta-tab.active {
    color: #25AC75;
    border-bottom-color: #25AC75;
    font-weight: 600;
}

.tam-meta-tab svg {
    opacity: 0.7;
}

.tam-meta-tab.active svg {
    opacity: 1;
}

/* ========================================
   TAB CONTENT
   ======================================== */

.tam-meta-tab-content {
    display: none;
}

.tam-meta-tab-content.active {
    display: block;
}

/* ========================================
   REQUEST INDEXING ACTION
   Lives IN the tab bar, pushed to the far right (Sam, 26 Aug): it acts on the
   page and not on one tab's fields, so it belongs on the one row that is
   visible whichever tab is open — and on that row it costs no vertical space at
   all. Same markup on the post editor and the term editor.

   Deliberately quiet: this is a once-per-change action that then sits out a 48h
   window, so it gets a ghost button at a tighter-than-sm height and no line of
   its own for the explanation (that moved into the tooltip). Only the cooldown
   state re-adds a sentence, because "in about N h" is information the user
   cannot get anywhere else on this screen.
   ======================================== */

.tr-index-request {
    display: flex;
    align-items: center;
    gap: 8px;
    /* margin-left:auto is what pushes it to the right edge of .tam-meta-tabs;
       align-self keeps it centred against the tabs' own 12px padding instead of
       stretching to the full height of the row. */
    margin: 0 0 0 auto;
    align-self: center;
    flex: 0 0 auto;
}

/* The one state that needs more than a button: the cooldown sentence is ~320px
   and four tabs already fill a 637px meta box, so let the bar wrap and give the
   action its own right-aligned line rather than squeezing the sentence into a
   few pixels of ellipsis. Available state fits next to the tabs and never
   wraps, which is the state that is on screen 99% of the time. */
.tam-meta-tabs {
    flex-wrap: wrap;
    row-gap: 4px;
}

.tr-index-request .tamrank-index-link {
    flex: 0 0 auto;
    /* One notch below --tr-btn-height-sm: an action, not a podium. The ghost
       variant keeps a hairline outline here on purpose — without it a lone
       icon+label at the top of the panel reads as a caption, not as something
       you can click. */
    height: 26px;
    padding: 0 9px;
    gap: 6px;
    font-size: var(--tr-text-xs, 12px);
    font-weight: var(--tr-font-medium, 500);
    border-color: var(--tr-color-slate-200);
}

.tr-index-request .tamrank-index-link:hover:not(:disabled) {
    border-color: var(--tr-color-slate-300);
}

.tr-index-request .tamrank-index-link svg {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
}

/* A disabled button cannot carry a tooltip - Chrome fires no mouse events on
   it - so the cooldown sentence has to stay on screen as text. */
.tr-index-request__hint {
    font-size: var(--tr-text-xs, 12px);
    line-height: 1.4;
    color: var(--tr-color-slate-500, #64748b);
    font-family: var(--tr-font-family, inherit);
}

/* ========================================
   META BOX CONTAINER
   ======================================== */

.tam-rank-meta-box {
    background: rgba(236, 235, 228, 0.6);
    padding: 20px;
    border-radius: 12px;
}

/* ========================================
   SCORE CARD & TIPS
   ======================================== */

.tam-score-card {
    background: linear-gradient(135deg, var(--tr-color-surface) 0%, var(--tr-color-white) 100%);
    border-radius: var(--tr-radius-lg);
    padding: var(--tr-space-5);
    border: 1px solid var(--tr-color-slate-200);
    margin-bottom: var(--tr-space-4);
}

.tam-score-card__title {
    margin: 0 0 var(--tr-space-4) 0;
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-800);
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    font-family: var(--tr-font-family);
}

.tam-score-card__value {
    text-align: center;
    margin-bottom: var(--tr-space-4);
}

.tam-score-card__number {
    font-size: 48px;
    font-weight: var(--tr-font-bold);
    line-height: 1;
    font-family: var(--tr-font-family);
}

.tam-score-card__bar {
    height: 8px;
    background: var(--tr-color-slate-200);
    border-radius: var(--tr-radius-sm);
    overflow: hidden;
    margin-bottom: var(--tr-space-3);
}

.tam-score-card__fill {
    height: 100%;
    border-radius: var(--tr-radius-sm);
    transition: all 0.3s ease;
}

.tam-score-card__hint {
    margin: 0;
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-400);
    text-align: center;
    line-height: var(--tr-leading-relaxed);
    font-family: var(--tr-font-family);
}

/* Tips card */
.tam-tips-card {
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-lg);
    padding: var(--tr-space-4);
    border: 1px solid var(--tr-color-slate-200);
}

.tam-tips-card__title {
    margin: 0 0 var(--tr-space-3) 0;
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-800);
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    font-family: var(--tr-font-family);
}

.tam-tips-card__list {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    font-family: var(--tr-font-family);
}

.tam-tips-card__empty {
    margin: 0;
    padding: var(--tr-space-2);
    background: var(--tr-color-surface);
    border-radius: var(--tr-radius-md);
}

/* Tips list items */
.tam-tips-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tam-tip {
    margin-bottom: var(--tr-space-2);
    font-size: var(--tr-text-xs);
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    font-family: var(--tr-font-family);
}

.tam-tip--passed {
    color: var(--tr-color-status-excellent);
}

.tam-tip--failed {
    color: var(--tr-color-status-improve);
}

.tam-tip__icon {
    font-weight: var(--tr-font-bold);
    flex-shrink: 0;
}

.tam-tip__text {
    flex: 1;
}

.tam-tip__detail {
    color: var(--tr-color-slate-500);
    font-weight: var(--tr-font-regular);
}

/* ========================================
   SEO TAB LAYOUT
   ======================================== */

.tam-seo-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--tr-space-6);
    align-items: start;
}

.tam-seo-sidebar {
    position: sticky;
    top: var(--tr-space-8);
}

.tam-seo-fields {
    display: flex;
    flex-direction: column;
    gap: var(--tr-space-5);
}

.tam-seo-fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tr-space-5);
}

.tam-section-title {
    margin: 0 0 var(--tr-space-3) 0;
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-800);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tam-checkbox-row {
    display: flex;
    gap: var(--tr-space-5);
    margin-top: var(--tr-space-2);
}

/* ========================================
   FIELD GROUPS - WHITE BOXES
   ======================================== */

.tam-field-group {
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    padding: var(--tr-space-4);
}

/* Danger zone separator */
.tr-danger-separator {
    display: flex;
    align-items: center;
    gap: var(--tr-space-3);
}

.tr-danger-separator::before,
.tr-danger-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--tr-color-error);
    opacity: 0.3;
}

.tr-danger-separator__label {
    font-size: 11px;
    font-weight: var(--tr-font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tr-color-error);
    white-space: nowrap;
}

/* ========================================
   FIELD HEADER
   ======================================== */

.tam-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tam-field-group label {
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-medium);
    color: var(--tr-color-slate-800);
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 8px 0;
}

/* ========================================
   INPUT FIELDS
   ======================================== */

.tam-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--tr-color-slate-200) !important;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

/* The box-shadows below need !important: WP-admin styles focus as
   `input[type=number]:focus` (0,2,1), which outranks `.tam-input:focus` (0,2,0)
   and paints its own blue ring straight through our green one. The border-color
   was already winning on !important, which is why only the glow stayed blue. */
.tam-input:focus {
    outline: 2px solid transparent;
    border-color: var(--tr-color-primary) !important;
    box-shadow: var(--tr-shadow-focus) !important;
}

/* Validation States */
.tam-input.tam-valid {
    border-color: var(--tr-color-primary) !important;
}

.tam-input.tam-valid:focus {
    border-color: var(--tr-color-primary) !important;
    box-shadow: var(--tr-shadow-focus) !important;
}

.tam-input.tam-warning {
    border-color: var(--tr-color-status-attention) !important;
}

.tam-input.tam-warning:focus {
    border-color: var(--tr-color-status-attention) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1) !important;
}

.tam-input.tam-error {
    border-color: var(--tr-color-error) !important;
}

.tam-input.tam-error:focus {
    border-color: var(--tr-color-error) !important;
    box-shadow: var(--tr-shadow-error) !important;
}

.tam-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: var(--tr-font-family);
}

/* ========================================
   CHARACTER COUNTER
   ======================================== */

.char-counter {
    font-size: 13px;
    font-weight: 500;
    color: #6B7280;
}

.char-counter.tam-success {
    color: #25AC75;
}

.char-counter.tam-warning {
    color: #FAA530;
}

.char-counter.tam-error {
    color: #DC7EA0;
}

/* ========================================
   VARIABLE BUTTONS
   ======================================== */

.tamrank-variable-wrapper {
    margin-top: var(--tr-space-2);
}

.tamrank-vars-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: var(--tr-text-xs);
    font-family: var(--tr-font-family);
    color: var(--tr-color-slate-500);
    transition: color var(--tr-transition-fast);
}

.tamrank-vars-toggle:hover {
    color: var(--tr-color-slate-700);
}

.tamrank-vars-container {
    display: none;
    margin-top: var(--tr-space-3);
    padding: var(--tr-space-3);
    background: var(--tr-color-surface);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
}

.tamrank-vars-container--open {
    display: block;
}

.tamrank-vars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tr-space-2);
}

.tamrank-var-btn {
    padding: 6px 12px;
    font-size: var(--tr-text-xs);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    background: var(--tr-color-white);
    color: var(--tr-color-slate-800);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-sm);
    cursor: pointer;
    transition: all var(--tr-transition-fast);
    box-shadow: var(--tr-shadow-sm);
}

.tamrank-var-btn:hover {
    background: var(--tr-color-slate-100);
    border-color: var(--tr-color-slate-300);
}

/* ========================================
   INFO ICON & TOOLTIPS
   ======================================== */

/* .tam-info-icon SVG color rules: removed — markup migrated to .tr-tooltip
   component which uses currentColor from the trigger button styles. */

/* Google Preview */
.google-preview {
    background: var(--tr-color-slate-100);
    border: 1px solid var(--tr-color-slate-200);
    padding: 16px;
    border-radius: 8px;
    font-family: arial, sans-serif;
}

.preview-url {
    color: #1E40AF;
    font-size: 12px;
    margin-bottom: 4px;
}

.preview-title {
    color: #1A0DAB;
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 4px;
    cursor: pointer;
    font-weight: 400;
}

.preview-title:hover {
    text-decoration: underline;
}

.preview-description {
    color: #4B5563;
    font-size: 14px;
    line-height: 1.5;
}

/* Legacy .tam-info-icon tooltip styles removed — markup migrated to canonical
   .tr-tooltip component (assets/css/common/tooltip.css). The overflow:visible
   rule below stays because the new .tr-tooltip uses absolute positioning that
   would otherwise be clipped by .postbox / .form-table cells. */
.form-table th,
.form-table td,
.postbox,
.postbox .inside,
.tam-rank-meta-box {
    overflow: visible !important;
}

.postbox .inside {
    overflow: visible !important;
}

/* ========================================
   FIELD CARD COMPONENTS
   ======================================== */

.tr-field-card__footer {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    margin-top: var(--tr-space-2);
}

.tr-field-card__footer .tr-style-selector__label {
    margin-left: auto;
    margin-bottom: 0;
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-medium);
    color: var(--tr-color-slate-500);
    white-space: nowrap;
    line-height: var(--tr-btn-height-sm);
}

.tr-field-card__footer .tr-btn--ai {
    margin-left: auto;
}

.tr-field-card__footer .tr-style-selector__label~.tr-btn--ai {
    margin-left: 0;
}

.tr-btn--ai {
    background: var(--tr-color-primary-light);
    color: var(--tr-color-primary);
    border-color: transparent;
}

.tr-btn--ai:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.18);
    color: var(--tr-color-primary-hover);
}

.tr-field-card__footer select.tr-style-selector__select {
    appearance: none;
    -webkit-appearance: none;
    height: var(--tr-btn-height-sm);
    padding: 0 28px 0 var(--tr-space-3);
    border: 1.5px solid var(--tr-color-surface);
    border-radius: var(--tr-radius-md);
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-700);
    background: var(--tr-color-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23475569' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    cursor: pointer;
    line-height: var(--tr-btn-height-sm);
    box-shadow: none;
    outline: none;
    transition: border-color var(--tr-transition-fast);
}

.tr-field-card__footer select.tr-style-selector__select:hover {
    border-color: var(--tr-color-slate-300);
}

.tr-field-card__footer select.tr-style-selector__select:focus {
    border-color: var(--tr-color-primary);
    box-shadow: var(--tr-shadow-focus);
}

/* ========================================
   SECONDARY KEYWORDS
   ======================================== */

.tr-secondary-kw {
    padding: var(--tr-space-5);
}

.tr-secondary-kw__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--tr-space-3);
}

.tr-secondary-kw__title {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
}

.tr-secondary-kw__title label {
    margin: 0;
    font-size: var(--tr-text-base);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-900);
}

.tr-icon--accent {
    stroke: var(--tr-color-primary);
}

.tamrank-pro-badge {
    background: var(--tr-color-primary-light);
    color: var(--tr-color-primary);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-size: 10px;
    font-weight: var(--tr-font-bold);
    padding: 3px 8px;
    border-radius: var(--tr-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Toggle switch */
.tamrank-toggle-switch {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    cursor: pointer;
}

.tamrank-toggle-switch__label {
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-500);
}

.tamrank-toggle-switch__track {
    position: relative;
    width: 44px;
    height: 24px;
}

.tamrank-toggle-switch__track input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.tamrank-toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--tr-color-slate-300);
    border-radius: var(--tr-radius-full);
    transition: background var(--tr-transition-slow);
}

.tamrank-toggle-slider::after {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-full);
    transition: left var(--tr-transition-slow);
}

.tamrank-toggle-switch__track input:checked+.tamrank-toggle-slider {
    background: var(--tr-color-primary);
}

.tamrank-toggle-switch__track input:checked+.tamrank-toggle-slider::after {
    left: 23px;
}

.tr-secondary-kw__desc {
    margin: 0 0 var(--tr-space-4) 0;
    color: var(--tr-color-slate-500);
    font-size: var(--tr-text-sm);
    line-height: var(--tr-leading-relaxed);
}

.tr-secondary-kw__badge {
    width: 24px;
    height: 24px;
    border-radius: var(--tr-radius-full);
    background: var(--tr-color-slate-800);
    color: var(--tr-color-white);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-semibold);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tr-secondary-kw__fields {
    display: none;
}

.tr-secondary-kw__fields--visible {
    display: block;
}

.tamrank-secondary-keyword-item {
    margin-bottom: var(--tr-space-3);
}

.tamrank-secondary-keyword-item__row {
    display: flex;
    align-items: center;
    gap: var(--tr-space-3);
}

.tamrank-secondary-keyword-item__row .tam-input {
    flex: 1;
    background: var(--tr-color-slate-100);
}

.tamrank-clear-keyword {
    padding: 6px 10px;
    background: transparent;
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-sm);
    color: var(--tr-color-slate-500);
    cursor: pointer;
    transition: all var(--tr-transition-fast);
}

.tamrank-clear-keyword:hover {
    border-color: var(--tr-color-error);
    color: var(--tr-color-error);
}

/* Suggestions */
.tr-suggestions-box {
    margin-top: var(--tr-space-4);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--tr-space-2);
}

.tr-suggestions-box__label {
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-medium);
    color: var(--tr-color-slate-500);
}

.tamrank-keyword-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tr-space-2);
}

.tamrank-add-suggestion {
    padding: 6px 14px;
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-full);
    color: var(--tr-color-slate-600);
    font-size: var(--tr-text-sm);
    cursor: pointer;
    transition: all var(--tr-transition-fast);
}

.tamrank-add-suggestion:hover {
    border-color: var(--tr-color-slate-400);
    color: var(--tr-color-slate-800);
}

.tamrank-add-suggestion--added {
    background: var(--tr-color-success-bg);
    border-color: var(--tr-color-success);
    color: var(--tr-color-success);
}

/* PRO upgrade */
.tr-pro-upgrade {
    text-align: center;
    padding: var(--tr-space-8) var(--tr-space-5);
}

.tr-pro-upgrade__icon {
    margin-bottom: var(--tr-space-4);
}

.tr-pro-upgrade__title {
    margin: 0 0 var(--tr-space-2) 0;
    font-size: var(--tr-text-lg);
    color: var(--tr-color-slate-900);
}

.tr-pro-upgrade__desc {
    margin: 0 0 var(--tr-space-5) 0;
    color: var(--tr-color-slate-500);
    font-size: var(--tr-text-base);
    line-height: var(--tr-leading-relaxed);
}

.tam-upgrade-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--tr-color-primary);
    color: var(--tr-color-white);
    text-decoration: none;
    border-radius: var(--tr-radius-md);
    font-weight: var(--tr-font-semibold);
    font-size: var(--tr-text-base);
    box-shadow: var(--tr-shadow-primary-hover);
    transition: all var(--tr-transition-fast);
}

.tam-upgrade-button:hover {
    background: var(--tr-color-primary-hover);
    color: var(--tr-color-white);
}

.tr-field-card__hint {
    color: var(--tr-color-slate-400);
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-regular);
}

/* ========================================
   SCHEMA TAB
   ======================================== */

.tamrank-schema-tab-nieuwe-ux {
    padding: 0;
    font-family: var(--tr-font-family);
}

/* Bronkeuze sectie */
.tam-bronkeuze-sectie {
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg);
    padding: var(--tr-space-5);
    margin-bottom: var(--tr-space-4);
}

.tam-bronkeuze-label {
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--tr-color-slate-400);
    margin-bottom: var(--tr-space-2);
}

.tam-bronkeuze-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--tr-space-2);
}

/* Bronkeuze card */
.tam-bronkeuze-kaart-wrap {
    position: relative;
}

.tam-bronkeuze-kaart {
    display: block;
    position: relative;
    border: 1px solid var(--tr-color-slate-200);
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-md);
    padding: var(--tr-space-3) var(--tr-space-4);
    cursor: pointer;
    transition: border-color var(--tr-transition-fast), background var(--tr-transition-fast);
}

.tam-bronkeuze-kaart:hover:not(.tam-bronkeuze-actief):not(.tam-bronkeuze-kaart--locked):not(.tam-bronkeuze-kaart--disabled) {
    border-color: var(--tr-color-status-good);
    background: var(--tr-color-success-light);
}

.tam-bronkeuze-kaart.tam-bronkeuze-actief {
    border: 1.5px solid var(--tr-color-primary);
    background: var(--tr-color-success-light);
}

.tam-bronkeuze-kaart--locked {
    border-style: dashed;
    border-color: var(--tr-color-slate-300);
    background: var(--tr-color-slate-100);
    cursor: default;
}

.tam-bronkeuze-kaart--locked .tam-bronkeuze-kaart__titel {
    color: var(--tr-color-slate-500);
}

.tam-bronkeuze-kaart--locked .tam-bronkeuze-kaart__sub {
    color: var(--tr-color-slate-400);
}

.tam-bronkeuze-kaart--locked .tam-bronkeuze-icon {
    background: var(--tr-color-slate-300);
}

.tam-bronkeuze-kaart__lock-link {
    margin-top: var(--tr-space-2);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-primary);
    text-decoration: none;
}

.tam-bronkeuze-kaart__lock-link:hover,
.tam-bronkeuze-kaart__lock-link:focus {
    color: var(--tr-color-primary);
    text-decoration: underline;
}

.tam-bronkeuze-kaart--disabled {
    opacity: 0.5;
    pointer-events: none;
}

.tam-bronkeuze-kaart__body {
    display: flex;
    flex-direction: column;
    gap: var(--tr-space-2);
}

.tam-bronkeuze-kaart__header {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
}

.tam-bronkeuze-icon {
    width: 28px;
    height: 28px;
    background: var(--tr-color-slate-400);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tam-bronkeuze-actief .tam-bronkeuze-icon {
    background: var(--tr-color-primary);
}

.tam-bronkeuze-kaart__titel {
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-medium);
    color: var(--tr-color-slate-900);
}

.tam-bronkeuze-kaart__sub {
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    line-height: 1.4;
}

.tam-bronkeuze-kaart__hint {
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-400);
    font-style: italic;
}

/* Selected pill badge */
.tam-bronkeuze-kaart__selected {
    display: none;
    position: absolute;
    top: 36px;
    right: var(--tr-space-1);
    background: var(--tr-color-primary);
    color: var(--tr-color-white);
    font-family: var(--tr-font-family);
    font-size: 10px !important;
    font-weight: var(--tr-font-medium);
    border-radius: var(--tr-radius-full);
    padding: 4px 8px !important;
    height: auto !important;
    min-height: unset !important;
    line-height: 1.2;
    margin-top: 6px;
    margin-right: 6px;
}

.tam-bronkeuze-actief .tam-bronkeuze-kaart__selected {
    display: inline-flex;
}

/* PRO badge */
.tam-bronkeuze-kaart__pro-badge {
    position: absolute;
    top: var(--tr-space-2);
    right: var(--tr-space-2);
    background: rgba(16, 185, 129, 0.1);
    color: var(--tr-color-primary);
    border: 1px solid rgba(16, 185, 129, 0.2);
    font-family: var(--tr-font-family);
    font-size: 9px;
    font-weight: var(--tr-font-bold);
    padding: 3px var(--tr-space-2);
    border-radius: var(--tr-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Re-detect button (positioned inside card wrapper) */
.tam-detecteer-opnieuw {
    position: absolute;
    top: var(--tr-space-1);
    right: var(--tr-space-1);
    z-index: 10;
    font-size: 10px !important;
    padding: 4px 8px !important;
    height: auto !important;
    min-height: unset !important;
    line-height: 1.2;
    margin-top: 6px;
    margin-right: 6px;
}

/* Betrouwbaarheid meter */
.tam-bronkeuze-betrouwbaarheid {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    margin-top: var(--tr-space-1);
}

.tam-bronkeuze-betrouwbaarheid__track {
    flex: 1;
    height: 5px;
    background: var(--tr-color-slate-200);
    border-radius: 3px;
    overflow: hidden;
}

.tam-bronkeuze-betrouwbaarheid__fill {
    height: 100%;
    background: var(--tr-color-primary);
    border-radius: 3px;
}

.tam-bronkeuze-betrouwbaarheid__pct {
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-primary);
}

/* ── Schema card (shared SECTIE 1/3 container) ────────────── */

.tam-schema-card {
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg);
    padding: var(--tr-space-4) var(--tr-space-5);
    margin-bottom: var(--tr-space-4);
}

.tam-schema-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--tr-space-3);
}

.tam-schema-card__main {
    flex: 1;
}

.tam-schema-card--no-padding {
    padding: 0;
}

.tam-schema-section-label {
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    letter-spacing: 0.05em;
    margin-bottom: var(--tr-space-2);
}

/* ── Bron info ─────────────────────────────────────────────── */

.tam-bron-info {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
}

.tam-bron-info__separator {
    color: var(--tr-color-slate-300);
}

.tam-bron-info__muted {
    color: var(--tr-color-slate-400);
}

/* ── Accordion (shared SECTIE 3/4 toggle) ──────────────────── */

.tam-accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tr-space-4) var(--tr-space-5);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--tr-font-family);
}

.tam-accordion-toggle--disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.tam-accordion-toggle__label {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    color: var(--tr-color-slate-400);
}

.tam-accordion-toggle__text {
    font-size: var(--tr-text-sm);
    font-weight: 600;
    color: inherit;
}

.tam-accordion-toggle__sub {
    font-size: var(--tr-text-xs);
    color: inherit;
    font-weight: 400;
}

.tam-accordion-toggle__hint {
    font-size: var(--tr-text-xs);
    color: inherit;
    font-style: italic;
}

.tam-accordion-chevron {
    color: var(--tr-color-slate-400);
    transition: transform 0.2s;
}

.tam-accordion-content {
    display: none;
    padding: 0 var(--tr-space-5) var(--tr-space-5);
    border-top: 1px solid var(--tr-color-slate-200);
}

/* ── Instellingen paneel (SECTIE 2) ────────────────────────── */

.tam-schema-instellingen-paneel {
    display: none;
    margin-bottom: var(--tr-space-5);
}

.tam-bronkeuze-radio {
    display: none !important;
}

.tam-bronkeuze-upgrade {
    margin-top: var(--tr-space-2);
    align-self: flex-start;
}

.tam-auto-badges {
    margin-top: var(--tr-space-1);
}

/* Template info banner */
.tam-template-info-banner {
    margin-bottom: var(--tr-space-3);
    padding: var(--tr-space-2) var(--tr-space-3);
    background: var(--tr-color-surface);
    border-radius: var(--tr-radius-md);
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    color: var(--tr-color-slate-500);
    font-size: var(--tr-text-xs);
    font-family: var(--tr-font-family);
}

.tam-template-info-banner svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.tam-template-info-banner strong {
    color: var(--tr-color-slate-700);
}

/* ── Template selectie ─────────────────────────────────────── */

.tam-template-selectie {
    margin-top: var(--tr-space-4);
    padding-top: var(--tr-space-4);
    border-top: 1px solid var(--tr-color-slate-200);
}

.tam-template-selectie__label {
    display: block;
    margin-bottom: var(--tr-space-2);
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-sm);
    font-weight: 500;
    color: var(--tr-color-slate-600);
}

.tam-template-selectie__row {
    display: flex;
    align-items: center;
    gap: var(--tr-space-3);
}

.tam-template-selectie__select {
    flex: 1;
    max-width: 400px;
    padding: var(--tr-space-2) var(--tr-space-3) !important;
    border: 1px solid var(--tr-color-slate-300) !important;
    border-radius: var(--tr-radius-md) !important;
    font-family: var(--tr-font-family) !important;
    font-size: var(--tr-text-sm) !important;
    background: var(--tr-color-white) !important;
    color: var(--tr-color-slate-700) !important;
    height: auto !important;
    min-height: unset !important;
    line-height: 1.5 !important;
    box-shadow: none !important;
}

/* Schema badges */
.tam-schema-badges {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    flex-wrap: wrap;
    margin-bottom: var(--tr-space-2);
}

.tam-schema-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 6px;
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-medium);
    line-height: 1;
}

.tam-schema-badge--primary {
    background: var(--tr-color-primary);
    color: var(--tr-color-white);
}

.tam-schema-badge--outline {
    background: transparent;
    border: 1px solid var(--tr-color-slate-300);
    color: var(--tr-color-slate-600);
}

.tam-schema-badge--separator {
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-300);
}

.tam-schema-badge--empty {
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-400);
}

/* Schema status banner */
.tam-schema-status-banner {
    display: flex;
    align-items: center;
    height: 36px;
    padding: 0 var(--tr-space-4);
    background: var(--tr-color-success-light);
    border-bottom: 1px solid var(--tr-color-slate-200);
    margin-bottom: var(--tr-space-4);
    gap: var(--tr-space-2);
    font-family: var(--tr-font-family);
}

.tam-schema-status-banner__left {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
}

.tam-schema-status-banner__icon {
    color: var(--tr-color-primary);
    flex-shrink: 0;
}

.tam-schema-status-banner__text {
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-900);
}

.tam-schema-status-banner__text strong {
    font-weight: var(--tr-font-semibold);
}

.tam-schema-status-banner__sub {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-400);
    margin-left: var(--tr-space-2);
}

.tam-schema-status-banner__sub a {
    color: var(--tr-color-status-good);
    text-decoration: none;
}

.tam-schema-status-banner__sub a:hover {
    text-decoration: underline;
}

@keyframes tam-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.tam-spin {
    animation: tam-spin 1s linear infinite;
}

/* ── JSON-LD Preview (SECTIE 4) ────────────────────────────── */

.tam-jsonld-sectie {
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg);
    margin-bottom: var(--tr-space-4);
}

.tam-jsonld-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tr-space-4) var(--tr-space-5);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.tam-jsonld-toggle__label {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    font-family: var(--tr-font-family);
    font-size: var(--tr-text-sm);
    font-weight: 600;
    color: var(--tr-color-slate-700);
}

.tam-jsonld-toggle__chevron {
    color: var(--tr-color-slate-400);
    transition: transform 0.2s;
}

.tam-jsonld-content {
    display: none;
    padding: 0 var(--tr-space-5) var(--tr-space-5);
    border-top: 1px solid var(--tr-color-slate-200);
}

#schema-preview {
    background: var(--tr-color-slate-900);
    color: var(--tr-color-slate-200);
    padding: var(--tr-space-4);
    border-radius: var(--tr-radius-md);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: var(--tr-text-xs);
    max-height: 400px;
    overflow: auto;
    margin: var(--tr-space-4) 0;
}

#schema-preview pre {
    margin: 0;
    color: inherit;
    white-space: pre-wrap;
    line-height: 1.5;
}

.tam-jsonld-muted {
    color: var(--tr-color-slate-400);
}

.tam-jsonld-error {
    color: var(--tr-color-status-improve);
}

.tam-jsonld-actions {
    display: flex;
    gap: var(--tr-space-3);
    flex-wrap: wrap;
}

/* Responsive grid */
@media (max-width: 782px) {
    .tam-bronkeuze-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================
   Schema Detector (gemigreerd uit schema-detector.css)
   ============================================ */

/* Reset WP button defaults in detectie sectie */
.tamrank-schema-detectie-sectie button {
    box-shadow: none !important;
    text-shadow: none !important;
}

.tamrank-schema-detectie-sectie button:hover {
    transform: translateY(-1px);
}

.tamrank-schema-detectie-sectie button:active {
    transform: translateY(0);
}

.tamrank-schema-detectie-sectie button:focus {
    outline: 2px solid var(--tr-color-primary);
    outline-offset: 2px;
}

.tamrank-schema-detectie-sectie button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Accepteer / Opslaan button */
.tam-accepteer-schema,
.tam-sla-handmatig-op {
    background: var(--tr-color-primary) !important;
    color: var(--tr-color-white) !important;
    border: none !important;
}

.tam-accepteer-schema:hover,
.tam-sla-handmatig-op:hover {
    background: var(--tr-color-primary-hover) !important;
}

/* Kies Handmatig button */
.tam-toon-handmatig {
    background: var(--tr-color-slate-800) !important;
    color: var(--tr-color-white) !important;
    border: none !important;
}

.tam-toon-handmatig:hover {
    background: var(--tr-color-slate-900) !important;
}

/* Annuleer button */
.tam-verberg-handmatig {
    background: var(--tr-color-slate-600) !important;
    color: var(--tr-color-white) !important;
    border: none !important;
}

.tam-verberg-handmatig:hover {
    background: var(--tr-color-slate-700) !important;
}

/* Terug naar Automatisch button */
.tam-reset-naar-auto {
    background: var(--tr-color-white) !important;
    color: var(--tr-color-slate-500) !important;
    border: 2px solid var(--tr-color-slate-200) !important;
}

.tam-reset-naar-auto:hover {
    border-color: var(--tr-color-slate-400) !important;
    color: var(--tr-color-slate-600) !important;
    background: var(--tr-color-base) !important;
}

/* Handmatige selectie panel */
.tam-handmatige-selectie {
    transition: all var(--tr-transition-base);
}

/* Toast melding */
.tam-schema-melding {
    font-family: var(--tr-font-family);
}

/* Schema bron kaarten (detector) */
.tam-schema-bron-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tr-space-3);
    margin-bottom: var(--tr-space-4);
}

.tam-schema-bron-kaart {
    padding: var(--tr-space-4);
    background: var(--tr-color-white);
    border: 2px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    cursor: pointer;
    transition: all var(--tr-transition-base);
    text-align: center;
}

.tam-schema-bron-kaart:hover {
    border-color: var(--tr-color-primary);
}

.tam-schema-bron-kaart.tam-kaart-geselecteerd,
.tam-schema-bron-kaart:has(input:checked) {
    border-color: var(--tr-color-primary);
    background: var(--tr-color-success-light);
}

.tam-schema-bron-kaart.tam-kaart-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tam-bron-kaart-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto var(--tr-space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tr-color-slate-100);
    border-radius: var(--tr-radius-md);
}

.tam-bron-kaart-titel {
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-700);
    margin-bottom: var(--tr-space-1);
}

.tam-bron-kaart-beschrijving {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    line-height: 1.4;
}

/* Schema status balk */
.tam-schema-status-balk {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tr-space-3) var(--tr-space-4);
    background: var(--tr-color-base);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    margin-bottom: var(--tr-space-4);
}

.tam-schema-type-badges {
    display: flex;
    gap: var(--tr-space-2);
    flex-wrap: wrap;
}

.tam-schema-bron-label {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
}

/* Template selector */
.tam-template-selector-row {
    padding: var(--tr-space-3) var(--tr-space-4);
    background: var(--tr-color-base);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    margin-bottom: var(--tr-space-4);
}

/* Extra schemas */
.tam-extra-schemas-sectie {
    padding: var(--tr-space-4);
    background: var(--tr-color-base);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    margin-bottom: var(--tr-space-4);
}

.tam-extra-schemas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--tr-space-3);
}

.tam-extra-schemas-titel {
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-700);
}

.tam-extra-schemas-toggle {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
}

.tam-extra-schemas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tr-space-2);
}

.tam-extra-schema-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px var(--tr-space-3);
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: 6px;
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-600);
    cursor: pointer;
    transition: all var(--tr-transition-fast);
}

.tam-extra-schema-checkbox:hover {
    border-color: var(--tr-color-primary);
}

.tam-extra-schema-checkbox:has(input:checked) {
    background: var(--tr-color-success-light);
    border-color: var(--tr-color-primary);
    color: var(--tr-color-primary-hover);
}

/* JSON-LD Preview */
.tam-jsonld-toggle-row {
    margin-bottom: var(--tr-space-4);
}

.tam-toggle-jsonld {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--tr-space-2) 14px;
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: 6px;
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-500);
    cursor: pointer;
    transition: all var(--tr-transition-fast);
}

.tam-toggle-jsonld:hover {
    border-color: var(--tr-color-primary);
    color: var(--tr-color-primary);
}

.tam-jsonld-preview {
    padding: var(--tr-space-4);
    background: var(--tr-color-slate-800);
    border-radius: var(--tr-radius-md);
    margin-top: var(--tr-space-2);
    max-height: 300px;
    overflow: auto;
}

#tam-schema-preview-code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-200);
    line-height: 1.5;
}

#tam-schema-preview-code pre {
    margin: 0;
}

/* Advies blok */
.tam-advies-blok {
    padding: var(--tr-space-4);
    background: var(--tr-color-success-light);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    margin-bottom: var(--tr-space-4);
}

.tam-advies-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--tr-space-3);
}

.tam-advies-titel {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-primary-hover);
}

.tam-advies-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-medium);
}

.tam-status-actief {
    color: var(--tr-color-primary-hover);
}

.tam-status-afwijkend {
    color: var(--tr-color-status-attention);
}

.tam-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.tam-dot-actief {
    background: var(--tr-color-primary);
}

.tam-dot-afwijkend {
    background: var(--tr-color-status-attention);
}

.tam-advies-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tr-space-4);
}

.tam-advies-schema-info {
    flex: 1;
}

.tam-advies-schema-type {
    font-size: var(--tr-text-base);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-700);
    margin-bottom: var(--tr-space-1);
}

.tam-advies-extra-schemas {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tam-advies-extra-badge {
    padding: 2px var(--tr-space-2);
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-sm);
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-600);
}

.tam-advies-overnemen {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: var(--tr-space-2) var(--tr-space-4);
    background: var(--tr-color-primary);
    color: var(--tr-color-white);
    border: none;
    border-radius: 6px;
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-medium);
    cursor: pointer;
    transition: all var(--tr-transition-fast);
}

.tam-advies-overnemen:hover {
    background: var(--tr-color-primary-hover);
}

.tam-advies-overnemen.tam-btn-actief {
    background: var(--tr-color-success-light);
    color: var(--tr-color-primary-hover);
    border: 1px solid var(--tr-color-primary);
    cursor: default;
}

/* Accordion secties */
.tam-accordion-sectie {
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    margin-bottom: var(--tr-space-3);
    overflow: hidden;
}

.tam-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--tr-space-3) var(--tr-space-4);
    background: var(--tr-color-base);
    cursor: pointer;
    transition: background var(--tr-transition-fast);
}

.tam-accordion-header:hover {
    background: var(--tr-color-slate-100);
}

.tam-accordion-titel {
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-700);
}

.tam-accordion-chevron {
    transition: transform var(--tr-transition-base);
}

.tam-accordion-sectie.tam-accordion-open .tam-accordion-chevron {
    transform: rotate(180deg);
}

.tam-accordion-content {
    padding: var(--tr-space-4);
    background: var(--tr-color-white);
    border-top: 1px solid var(--tr-color-slate-200);
}

/* Responsive schema detector */
@media (max-width: 782px) {
    .tam-schema-bron-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tam-advies-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .tam-advies-overnemen {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .tam-bronkeuze-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================
   SOCIAL TAB
   ======================================== */

.tam-social-tab-content {
    padding: 0;
}

/* Social Tab Layout */
.tam-social-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tr-space-5);
}

.tam-social-sidebar {
    position: sticky;
    top: var(--tr-space-8);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: var(--tr-space-5);
}

/* Image Upload */
.tam-image-preview {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin-bottom: var(--tr-space-3);
    border-radius: var(--tr-radius-md);
    overflow: hidden;
    border: 2px solid var(--tr-color-slate-200);
}

.tam-image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

.tam-remove-image {
    position: absolute;
    top: var(--tr-space-2);
    right: var(--tr-space-2);
    width: 24px;
    height: 24px;
    background: rgba(244, 63, 94, 0.9);
    color: var(--tr-color-white);
    border: none;
    border-radius: var(--tr-radius-full);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tam-remove-image:hover {
    background: var(--tr-color-error);
}

.tam-image-upload-buttons {
    display: flex;
    align-items: center;
    margin-top: var(--tr-space-2);
}

.tam-btn-icon {
    margin-right: 6px;
}

.tam-fallback-hint {
    margin: var(--tr-space-3) 0 0 0;
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
}

.tam-fallback-hint__icon {
    vertical-align: middle;
    margin-right: 4px;
    color: var(--tr-color-primary);
}

/* Social Preview Cards */
.tam-social-preview-card {
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    overflow: hidden;
    margin-bottom: var(--tr-space-4);
}

.tam-social-preview-card:last-child {
    margin-bottom: 0;
}

.tam-preview-header {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2);
    padding: 10px 12px;
    background: var(--tr-color-slate-100);
    border-bottom: 1px solid var(--tr-color-slate-200);
}

.tam-preview-header__label {
    font-weight: var(--tr-font-semibold);
}

.tam-preview-header__label--facebook { color: #1877F2; }
.tam-preview-header__label--x { color: var(--tr-color-slate-900); }
.tam-preview-header__label--linkedin { color: #0A66C2; }
.tam-preview-header__label--instagram {
    background: linear-gradient(45deg, #FCAF45, #F77737, #C13584, #833AB4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tam-preview-body {
    background: var(--tr-color-white);
}

.tam-preview-image {
    width: 100%;
    height: 150px;
    background: var(--tr-color-slate-100);
    overflow: hidden;
}

.tam-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tam-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tr-color-slate-100);
}

.tam-no-image svg {
    stroke: var(--tr-color-slate-300);
}

.tam-preview-content {
    padding: 10px 12px;
}

.tam-preview-domain {
    font-size: 11px;
    color: var(--tr-color-slate-500);
    text-transform: uppercase;
}

.tam-preview-title {
    font-size: var(--tr-text-sm);
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-900);
    line-height: var(--tr-leading-tight);
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tam-preview-desc {
    font-size: var(--tr-text-xs);
    color: var(--tr-color-slate-500);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Twitter specific */
.tam-twitter-preview .tam-preview-image {
    border-radius: 12px;
    margin: 10px;
    width: calc(100% - 20px);
    height: 130px;
}

.tam-twitter-preview .tam-preview-content {
    padding: 0 12px 12px;
}

.tam-twitter-preview .tam-preview-domain {
    text-transform: none;
    margin-top: 4px;
}

/* LinkedIn specific */
.tam-linkedin-preview .tam-preview-image {
    height: 120px;
}

.tam-linkedin-preview .tam-preview-content {
    padding: 8px 12px;
}

/* Instagram specific */
.tam-instagram-preview .tam-instagram-image {
    height: 200px;
}

.tam-instagram-caption {
    padding: 10px 12px;
    font-size: 13px;
}

.tam-instagram-username {
    font-weight: var(--tr-font-semibold);
    color: var(--tr-color-slate-900);
    margin-right: 6px;
}

.tam-instagram-text {
    color: var(--tr-color-slate-900);
}

/* ========================================
   FLOATING ANALYSIS WIDGET
   ======================================== */

.tam-rank-floating-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: var(--tr-color-white);
    border-radius: var(--tr-radius-lg);
    box-shadow: var(--tr-shadow-lg);
    z-index: 9999;
    transition: all 0.3s ease;
}

.tam-rank-floating-widget.collapsed .tam-widget-body {
    display: none;
}

.tam-rank-floating-widget.collapsed .tam-widget-toggle svg {
    transform: rotate(180deg);
}

.tam-widget-header {
    padding: var(--tr-space-3) var(--tr-space-4);
    background: linear-gradient(135deg, var(--tr-color-slate-100) 0%, var(--tr-color-white) 100%);
    border-bottom: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-lg) var(--tr-radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.tam-widget-header strong {
    font-size: var(--tr-text-sm);
    color: var(--tr-color-slate-800);
}

.score-badge {
    padding: var(--tr-space-1) 10px;
    border-radius: var(--tr-radius-lg);
    font-size: var(--tr-text-xs);
    font-weight: var(--tr-font-bold);
    background: var(--tr-color-error);
    color: var(--tr-color-white);
    min-width: 40px;
    text-align: center;
}

.score-badge.excellent {
    background: var(--tr-color-status-excellent);
}

.score-badge.good {
    background: var(--tr-color-status-good);
}

.score-badge.average {
    background: var(--tr-color-status-attention);
}

.score-badge.poor {
    background: var(--tr-color-error);
}

.tam-widget-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--tr-space-1);
    display: flex;
    align-items: center;
    color: var(--tr-color-slate-500);
    transition: transform var(--tr-transition-slow);
}

.tam-widget-toggle:hover {
    color: var(--tr-color-primary);
}

.tam-widget-body {
    max-height: 400px;
    overflow-y: auto;
}

.tam-floating-subscore {
    background: var(--tr-color-white);
    border: 1px solid var(--tr-color-slate-200);
    border-radius: var(--tr-radius-md);
    padding: 10px var(--tr-space-3);
}

.tam-floating-schema.schema-active {
    background: linear-gradient(135deg, var(--tr-color-success-light) 0%, var(--tr-color-success-bg) 100%);
    border-color: var(--tr-color-primary);
}

.tam-floating-schema.schema-auto {
    background: linear-gradient(135deg, var(--tr-color-primary-light) 0%, var(--tr-color-success-bg) 100%);
    border-color: var(--tr-color-primary);
}

#tam-view-full-analysis:hover {
    transform: translateY(-1px);
    box-shadow: var(--tr-shadow-primary-hover);
    background: var(--tr-color-primary-hover);
}

#tam-view-full-analysis:active {
    transform: translateY(0);
}

/* ============================================
   AUDIT EXCLUSION NOTICE (meta box)
   ============================================ */

.tr-audit-excluded-notice {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: rgba(100, 116, 139, 0.08);
    border-radius: var(--tr-radius-md, 8px);
    font-size: var(--tr-text-sm, 0.8125rem);
    color: var(--tr-color-slate-600, #475569);
}

.tr-audit-excluded-notice svg {
    flex-shrink: 0;
    color: var(--tr-color-slate-400, #94a3b8);
}

.tr-audit-excluded-reason {
    color: var(--tr-color-slate-400, #94a3b8);
    font-style: italic;
}

/* ============================================================
   CHANGE HISTORY TIMELINE (meta box)
   ============================================================ */

.tam-change-history {
    margin-top: var(--tr-space-4, 16px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.tam-change-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #e2e8f0;
}

.tam-change-history-header:hover {
    background: #f8fafc;
}

.tam-change-history-header-left {
    display: flex;
    align-items: center;
    gap: var(--tr-space-2, 8px);
    color: var(--tr-color-slate-400, #94a3b8);
}

.tam-change-history-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.tam-change-history-count {
    font-size: 11px;
    font-weight: 700;
    background: var(--tr-color-slate-100, #f1f5f9);
    color: var(--tr-color-slate-400, #94a3b8);
    padding: 0 6px;
    border-radius: 8px;
}

.tam-change-history-chevron {
    color: var(--tr-color-slate-400, #94a3b8);
    transition: transform 0.2s;
}

.tam-change-history-chevron.is-open {
    transform: rotate(180deg);
}

/* Empty state */
.tam-change-history-empty {
    padding: 24px 20px;
    text-align: center;
}

.tam-change-history-empty p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

/* Timeline */
.tam-change-timeline {
    padding: 8px 20px 12px;
}

.tam-ct-entry {
    position: relative;
    padding: 16px 0 16px 28px;
    border-bottom: 1px solid #f1f5f9;
}

.tam-ct-entry:last-child {
    border-bottom: none;
}

/* Vertical line + dot */
.tam-ct-entry::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e2e8f0 !important;
}

.tam-ct-entry:first-child::before {
    top: 24px;
}

.tam-ct-entry:last-child::before {
    bottom: calc(100% - 24px);
}

.tam-ct-entry::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    left: 1px;
    top: 22px;
    width: 9px;
    height: 9px;
    border-radius: 50% !important;
    background: #ffffff !important;
    border: 2px solid #10b981 !important;
    z-index: 1;
}

/* Date + type badges */
.tam-ct-date {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tam-ct-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 5px;
    border-radius: 3px;
}

.tam-ct-badge--meta {
    background: var(--tr-color-info-bg, rgba(100,116,139,0.1));
    color: var(--tr-color-slate-600, #475569);
}

.tam-ct-badge--content {
    background: var(--tr-color-success-bg, rgba(16,185,129,0.1));
    color: var(--tr-color-primary, #10b981);
}

.tam-ct-badge--schema {
    background: var(--tr-color-warning-bg, rgba(245,158,11,0.1));
    color: var(--tr-color-warning, #f59e0b);
}

.tam-ct-badge--robots {
    background: var(--tr-color-error-bg, rgba(244,63,94,0.1));
    color: var(--tr-color-error, #f43f5e);
}

/* Change detail rows */
.tam-ct-detail {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 3px;
}

.tam-ct-field-label {
    font-weight: 700;
    color: #1e293b;
}

.tam-ct-old {
    color: var(--tr-color-slate-400, #94a3b8);
    text-decoration: line-through;
}

.tam-ct-arrow {
    color: var(--tr-color-slate-300, #cbd5e1);
    margin: 0 3px;
}

.tam-ct-new {
    color: #1e293b;
    font-weight: 600;
}

.tam-ct-stat {
    font-size: 12px;
    color: var(--tr-color-slate-500, #64748b);
}

.tam-ct-disclaimer {
    font-size: 10px;
    color: var(--tr-color-slate-400, #94a3b8);
    font-style: italic;
    margin-top: 2px;
}

/* Score bar */
.tam-ct-score {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 10px;
    background: var(--tr-color-slate-100, #f1f5f9);
    border-radius: 6px;
}

.tam-ct-score-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--tr-color-slate-500, #64748b);
    flex-shrink: 0;
}

.tam-ct-score-value {
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.tam-ct-score--positive {
    color: var(--tr-color-primary, #10b981);
}

.tam-ct-score--negative {
    color: var(--tr-color-error, #f43f5e);
}

.tam-ct-score--neutral {
    color: var(--tr-color-slate-400, #94a3b8);
}

.tam-ct-score-bar {
    flex: 1;
    height: 3px;
    background: var(--tr-color-slate-200, #e2e8f0);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.tam-ct-score-bar-before {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--tr-color-slate-300, #cbd5e1);
    border-radius: 2px;
}

.tam-ct-score-bar-after {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 2px;
}

.tam-ct-score-bar--positive {
    background: var(--tr-color-primary, #10b981);
}

.tam-ct-score-bar--negative {
    background: var(--tr-color-error, #f43f5e);
}

/* ==========================================================================
   Robots directives (FREE, 1.3.7)
   Shared by the post meta box and the taxonomy term screen.
   Scoped to .tr-robots so the rest of the meta box keeps WP-admin's own
   checkbox skin — only this block is branded.
   ========================================================================== */

.tr-robots__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px 36px;
}

/* Scoped to .tr-robots to outrank `.tam-field-group label` (line ~299, 0,1,1),
   which otherwise wins over a bare `.tr-robots__opt` (0,1,0) and forces its own
   gap, align-items and margin onto every option row. */
.tr-robots .tr-robots__opt {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 2px 0;
    cursor: pointer;
}

/* Het vinkje zelf staat sinds 1.3.8 als gedeeld component in
   tamrank-admin-global.css (sectie CHECKBOX), samen met .tr-check. Dat bestand
   wordt op dít scherm én op de plugin-pagina's geladen; dit bestand alleen
   hier. Verplaatst, niet gekopieerd: er is één bron. */

.tr-robots__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tr-robots__name {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--tr-color-slate-700, #334155);
    transition: color 0.15s ease;
}

.tr-robots__desc {
    font-size: 12px;
    line-height: 1.5;
    color: var(--tr-color-slate-500, #64748b);
}

.tr-robots__check:checked ~ .tr-robots__text .tr-robots__name {
    color: var(--tr-color-slate-900, #0f172a);
}

/* ── Collapsible advanced panel ─────────────────────────────────────────── */

.tr-robots-adv {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--tr-color-slate-200, #e2e8f0);
}

.tr-robots-adv__summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 0 -8px;
    border-radius: 6px;
    list-style: none;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--tr-color-slate-600, #475569);
    transition: background 0.15s ease, color 0.15s ease;
}

.tr-robots-adv__summary::-webkit-details-marker {
    display: none;
}

.tr-robots-adv__summary:hover {
    background: var(--tr-color-slate-100, #f1f5f9);
    color: var(--tr-color-slate-800, #1e293b);
}

.tr-robots-adv__chevron {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    color: var(--tr-color-slate-400, #94a3b8);
    transition: transform 0.18s ease;
}

.tr-robots-adv[open] .tr-robots-adv__chevron {
    transform: rotate(90deg);
}

/* Beats the UA `[hidden] { display: none }`, which inline-flex would override. */
.tr-robots-adv__count[hidden] {
    display: none;
}

.tr-robots-adv__count {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    background: var(--tr-color-primary-light, rgba(16, 185, 129, 0.1));
    color: var(--tr-color-primary-hover, #059669);
    font-size: 11px;
    font-weight: 700;
}

.tr-robots-adv__body {
    padding: 12px 0 2px;
}

.tr-robots-adv__hint {
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--tr-color-slate-500, #64748b);
}

.tr-robots-adv__limits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px 24px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--tr-color-slate-200, #e2e8f0);
}

.tr-robots-adv__limit label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 9px;
    font-size: 12px;
    font-weight: 600;
    color: var(--tr-color-slate-600, #475569);
}

.tr-robots-adv__limit .tam-input {
    width: 100%;
}
