/**
 * Componentes del Admin
 * Cards, Buttons, Toggles, Notices - Estilo Bentō
 *
 * @package BravesChat
 * @version 1.2.0
 */

/* ==================== UTILIDADES DE INTERACCIÓN ==================== */

/* Acento primario al hover: borde + sombra de color */
.braves-hover-accent {
    border: 1px solid transparent;
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.braves-hover-accent:hover,
.braves-accent-active {
    border-color: var(--braves-primary);
    box-shadow: var(--braves-shadow-accent);
}

/* Variante oscura: fondo muy oscuro + acento teal al hover */
.braves-hover-accent--dark:hover {
    background-color: rgba(1, 183, 175, 0.08);
    border-color: var(--braves-primary);
    box-shadow: var(--braves-shadow-accent);
}

/* ==================== CARD GRID (BENTO LAYOUT) ==================== */
.braves-card-grid {
    display: grid;
    gap: var(--braves-card-gap);
    margin-bottom: var(--braves-space-xl);
}

.braves-card-grid--2-cols {
    grid-template-columns: repeat(2, 1fr);
}

.braves-card-grid--3-cols {
    grid-template-columns: repeat(3, 1fr);
}

.braves-card-grid--4-cols {
    grid-template-columns: repeat(4, 1fr);
}

/* ==================== CARDS ==================== */
.braves-card {
    background: var(--braves-surface);
    border: 1px solid var(--braves-border-color);
    border-radius: 18px;
    padding: var(--braves-space-xl);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: var(--braves-space-md);
    position: relative;
    overflow: hidden;
}

.braves-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

/* Dark mode: neutro oscuro, teal sólo en hover/acento */
[data-braves-theme="dark"] .braves-card {
    background: var(--braves-surface);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 2px 8px rgba(0, 0, 0, 0.6);
}

[data-braves-theme="dark"] .braves-card:hover {
    background: var(--braves-surface-alt);
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 6px 20px rgba(0, 0, 0, 0.65);
    transform: translateY(-2px);
}

[data-braves-theme="dark"] a.braves-card.braves-card--clickable:hover {
    border-color: var(--braves-primary);
    box-shadow: var(--braves-shadow-accent);
}

a.braves-card.braves-card--clickable {
    display: flex;
    text-decoration: none !important;
    color: inherit !important;
}

a.braves-card.braves-card--clickable:focus-visible {
    outline: 2px solid var(--braves-primary);
    outline-offset: 4px;
}

a.braves-card.braves-card--clickable:hover {
    border-color: var(--braves-primary);
    box-shadow: var(--braves-shadow-accent);
}

.braves-card__icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.braves-card__icon svg {
    width: 30px;
    height: 30px;
    color: var(--braves-primary);
}

.braves-card__title {
    font-size: var(--braves-text-lg);
    font-weight: var(--braves-font-semibold);
    color: var(--braves-text-primary);
    margin: 0;
    line-height: var(--braves-leading-tight);
}

.braves-card__subtitle {
    font-size: var(--braves-text-sm);
    color: var(--braves-text-secondary);
    margin: 0;
}

.braves-card__description {
    font-size: var(--braves-text-base);
    color: var(--braves-text-secondary);
    margin: 0;
    line-height: var(--braves-leading-relaxed);
    flex: 1;
}

.braves-card__action {
    margin-top: auto;
    padding-top: var(--braves-space-sm);
}

.braves-card__action a {
    color: var(--braves-primary);
    text-decoration: none;
    font-weight: 600;
}

.braves-card__footer {
    padding-top: var(--braves-space-md);
    font-size: var(--braves-text-sm);
    color: var(--braves-text-secondary);
}

.braves-card--compact {
    padding: var(--braves-space-lg);
}

/* ==================== BUTTONS ==================== */
.braves-admin-wrap .braves-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--braves-space-sm);
    padding: 10px 24px !important;
    font-size: var(--braves-text-sm) !important;
    font-weight: 600 !important;
    font-family: var(--braves-font-sans) !important;
    line-height: 1.5 !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    white-space: nowrap !important;
    height: auto !important;
    text-shadow: none !important;
}

.braves-admin-wrap .braves-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--braves-primary-lighter) !important;
}

/* Button Primary */
.braves-admin-wrap .braves-button--primary {
    background: var(--braves-primary) !important;
    color: var(--braves-text-on-primary) !important;
    box-shadow: 0 2px 4px rgba(56, 88, 233, 0.2) !important;
}

.braves-admin-wrap .braves-button--primary:hover {
    background: var(--braves-primary-hover) !important;
    color: var(--braves-text-on-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(56, 88, 233, 0.3) !important;
}

.braves-admin-wrap .braves-button--primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(56, 88, 233, 0.2) !important;
}

/* Button Secondary */
.braves-admin-wrap .braves-button--secondary {
    background: var(--braves-surface) !important;
    color: var(--braves-text-secondary) !important;
    border: 1px solid var(--braves-border-color) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.braves-admin-wrap .braves-button--secondary:hover {
    background: var(--braves-surface-alt) !important;
    border-color: var(--braves-text-muted) !important;
    color: var(--braves-text-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.braves-admin-wrap .braves-button--secondary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

/* Button Link */
.braves-admin-wrap .braves-button--link {
    background: transparent !important;
    color: var(--braves-primary) !important;
    border: none !important;
    padding: var(--braves-space-sm) var(--braves-space-md) !important;
    box-shadow: none !important;
}

.braves-admin-wrap .braves-button--link:hover {
    color: var(--braves-primary-hover) !important;
    text-decoration: underline;
    transform: none;
    box-shadow: none !important;
}

/* Button Outline */
.braves-admin-wrap .braves-button--outline {
    background: transparent !important;
    color: var(--braves-primary) !important;
    border: 2px solid var(--braves-primary) !important;
    box-shadow: none !important;
}

.braves-admin-wrap .braves-button--outline:hover {
    background: var(--braves-primary) !important;
    color: var(--braves-text-on-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(56, 88, 233, 0.2) !important;
}

.braves-admin-wrap .braves-button--outline:active {
    transform: translateY(0);
}

.braves-button__icon {
    display: flex;
    align-items: center;
}

.braves-button__text {
    display: inline-block;
}

/* Button Group */
.braves-button-group {
    display: flex;
    gap: var(--braves-space-md);
    flex-wrap: wrap;
}

/* WordPress Submit Button Override - Estilo Bentō */
.braves-button-group .button-primary,
.braves-button-group input[type="submit"].button-primary {
    padding: 12px 32px !important;
    font-size: var(--braves-text-base) !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    border-radius: 50px !important;
    border: none !important;
    background: var(--braves-primary) !important;
    color: var(--braves-text-on-primary) !important;
    box-shadow: 0 2px 4px rgba(56, 88, 233, 0.2) !important;
    text-shadow: none !important;
    height: auto !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
}

.braves-button-group .button-primary:hover,
.braves-button-group input[type="submit"].button-primary:hover {
    background: var(--braves-primary-hover) !important;
    color: var(--braves-text-on-primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(56, 88, 233, 0.3) !important;
}

.braves-button-group .button-primary:active,
.braves-button-group input[type="submit"].button-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(56, 88, 233, 0.2) !important;
}

.braves-button-group .button-primary:focus,
.braves-button-group input[type="submit"].button-primary:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px var(--braves-primary-lighter) !important;
}

/* ==================== BADGES ==================== */
.braves-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--braves-space-xs) var(--braves-space-md);
    font-size: var(--braves-text-sm);
    font-weight: var(--braves-font-medium);
    border-radius: var(--braves-radius-full);
    line-height: 1;
}

.braves-badge--primary {
    background: var(--braves-primary-lighter);
    color: var(--braves-primary);
}

.braves-badge--success {
    background: var(--braves-success-light);
    color: var(--braves-success);
}

.braves-badge--warning {
    background: var(--braves-warning-light);
    color: var(--braves-warning);
}

.braves-badge--error {
    background: var(--braves-error-light);
    color: var(--braves-error);
}

/* Badge clickeable */
.braves-badge--clickable {
    text-decoration: none;
    cursor: pointer;
    transition: all var(--braves-transition-fast);
}

.braves-badge--clickable:hover {
    transform: translateY(-1px);
    box-shadow: var(--braves-shadow-sm);
}

.braves-badge--clickable.braves-badge--primary:hover,
.braves-badge--clickable.braves-badge--primary.braves-badge--active {
    background: var(--braves-primary-light);
    color: var(--braves-text-on-primary);
}

[data-braves-theme="dark"] .braves-badge--clickable.braves-badge--primary:hover,
[data-braves-theme="dark"] .braves-badge--clickable.braves-badge--primary.braves-badge--active {
    background: var(--braves-primary);
    color: var(--braves-text-on-primary);
}

/* ==================== TOGGLES / SWITCHES ==================== */
.braves-toggle {
    margin-bottom: var(--braves-space-md);
}

.braves-toggle__control {
    display: flex;
    align-items: center;
}

.braves-toggle__input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.braves-toggle__label {
    display: flex;
    align-items: center;
    gap: var(--braves-space-md);
    cursor: pointer;
    user-select: none;
}

.braves-toggle__switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: var(--braves-gray-300);
    border-radius: var(--braves-radius-full);
    transition: background var(--braves-transition-fast);
    flex-shrink: 0;
}

.braves-toggle__switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--braves-white);
    border-radius: 50%;
    transition: transform var(--braves-transition-fast);
    box-shadow: var(--braves-shadow-sm);
}

.braves-toggle__input:checked+.braves-toggle__label .braves-toggle__switch {
    background: var(--braves-primary);
}

.braves-toggle__input:checked+.braves-toggle__label .braves-toggle__switch::before {
    transform: translateX(24px);
}

.braves-toggle__input:focus+.braves-toggle__label .braves-toggle__switch {
    outline: 2px solid var(--braves-primary);
    outline-offset: 2px;
}

.braves-toggle__text {
    font-size: var(--braves-text-base);
    font-weight: var(--braves-font-medium);
    color: var(--braves-text-primary);
}

.braves-toggle__description {
    margin: var(--braves-space-sm) 0 0 62px;
    font-size: var(--braves-text-sm);
    color: var(--braves-text-secondary);
}

/* ==================== TOGGLE WRAPPER (SIMPLIFIED) ==================== */
/* Versión simplificada para uso en formularios */
.braves-toggle-wrapper {
    position: relative;
    display: inline-block;
}

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

.braves-toggle-slider {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    background-color: var(--braves-gray-300);
    border-radius: var(--braves-radius-full);
    transition: background-color var(--braves-transition-fast);
    cursor: pointer;
}

.braves-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--braves-white);
    border-radius: 50%;
    transition: transform var(--braves-transition-fast);
    box-shadow: var(--braves-shadow-sm);
}

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

.braves-toggle-input:checked+.braves-toggle-slider::before {
    transform: translateX(24px);
}

.braves-toggle-input:focus+.braves-toggle-slider {
    outline: 2px solid var(--braves-primary);
    outline-offset: 2px;
}

.braves-toggle-input:disabled+.braves-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== FORM INPUTS (braves-input / braves-select / braves-textarea) ==================== */
.braves-admin-wrap .braves-input,
.braves-admin-wrap .braves-select,
.braves-admin-wrap .braves-textarea {
    border: 1px solid var(--braves-border-color);
    border-radius: var(--braves-radius-md);
    padding: var(--braves-space-sm) var(--braves-space-md);
    font-size: var(--braves-text-base);
    font-family: var(--braves-font-sans);
    color: var(--braves-text-primary);
    background: var(--braves-surface-input);
    transition: all var(--braves-transition-fast);
    width: 100%;
    box-sizing: border-box;
}

.braves-admin-wrap .braves-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: var(--braves-leading-relaxed);
    background: var(--braves-surface-input) !important;
}

.braves-admin-wrap .braves-input:focus,
.braves-admin-wrap .braves-textarea:focus {
    border-color: var(--braves-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--braves-primary-lighter);
}

.braves-admin-wrap .braves-select:focus {
    border-color: var(--braves-primary);
    color: var(--braves-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--braves-primary-lighter);
}

/* Dark mode: forzar colores en select múltiple y sus options */
[data-braves-theme="dark"] .braves-admin-wrap .braves-select,
[data-braves-theme="dark"] .braves-admin-wrap .braves-select option {
    background-color: var(--braves-surface-input) !important;
    color: var(--braves-text-primary) !important;
}

[data-braves-theme="dark"] .braves-admin-wrap .braves-select option:checked,
[data-braves-theme="dark"] .braves-admin-wrap .braves-select option:hover {
    background-color: var(--braves-primary) !important;
    color: var(--braves-text-on-primary) !important;
}

/* Dark mode: toggle switch */
[data-braves-theme="dark"] .braves-toggle__switch {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-braves-theme="dark"] .braves-toggle__input:checked+.braves-toggle__label .braves-toggle__switch,
[data-braves-theme="dark"] .braves-toggle-input:checked+.braves-toggle-slider {
    background: var(--braves-primary);
    border-color: var(--braves-primary);
    box-shadow: 0 0 10px rgba(1, 183, 175, 0.3);
}

[data-braves-theme="dark"] .braves-toggle-slider {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Dark mode: section --actions card */
[data-braves-theme="dark"] .braves-section--actions {
    background: var(--braves-surface);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 2px 12px rgba(0, 0, 0, 0.5);
}

.braves-field-help {
    color: var(--braves-text-secondary) !important;
    font-size: var(--braves-text-sm) !important;
    line-height: var(--braves-leading-relaxed);
    margin: 0;
}

/* ==================== NOTICES / ALERTS - Estilo Bentō ==================== */
.braves-notice {
    padding: var(--braves-space-lg);
    border-radius: var(--braves-radius-lg);
    margin-bottom: var(--braves-space-lg);
    margin-top: var(--braves-space-lg);
    border: none;
    box-shadow: var(--braves-shadow-md);
    animation: braves-notice-fade-in 0.3s ease-out;
}

@keyframes braves-notice-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes braves-notice-slide-out {
    0% {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }

    100% {
        opacity: 0;
        transform: translateY(-20px);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-top: 0;
        margin-bottom: 0;
    }
}

.braves-notice--hiding {
    animation: braves-notice-slide-out 0.5s ease-out forwards;
    overflow: hidden;
}

.braves-notice__content {
    font-size: var(--braves-text-base);
    line-height: var(--braves-leading-relaxed);
    color: var(--braves-white);
    font-weight: 500;
}

.braves-notice--info {
    background: var(--braves-info);
}

.braves-notice--success {
    background: var(--braves-success);
}

.braves-notice--warning {
    background: var(--braves-warning);
}

.braves-notice--error {
    background: var(--braves-error);
}

/* ==================== ABOUT PAGE ==================== */
/* Team section */
.braves-about-team {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--braves-space-xl);
    margin-top: var(--braves-space-lg);
}

.braves-about-team__member {
    padding: var(--braves-space-xl);
    background: var(--braves-surface);
    border: 1px solid var(--braves-border-color);
    border-radius: var(--braves-radius-lg);
    box-shadow: var(--braves-shadow-sm);
    transition: all var(--braves-transition-fast);
    cursor: pointer;
}

.braves-about-team__member:hover {
    box-shadow: var(--braves-shadow-md);
    transform: translateY(-2px);
}

/* Clickeable cards */
a:has(.braves-card),
a:has(.braves-about-team__member) {
    cursor: pointer;
    outline: none !important;
}

a:has(.braves-card):focus,
a:has(.braves-about-team__member):focus,
a:has(.braves-card):focus-visible,
a:has(.braves-about-team__member):focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

a:has(.braves-card) .braves-card:hover,
a:has(.braves-about-team__member) .braves-about-team__member:hover {
    cursor: pointer;
}

.braves-about-team__name {
    font-size: var(--braves-text-lg);
    font-weight: var(--braves-font-semibold);
    color: var(--braves-gray-900);
    margin: 0 0 var(--braves-space-xs) 0;
}

.braves-about-team__role {
    font-size: var(--braves-text-sm);
    color: var(--braves-gray-600);
    margin: 0 0 var(--braves-space-sm) 0;
}

.braves-about-team__email {
    font-size: var(--braves-text-sm);
    color: var(--braves-primary);
    margin: 0;
    font-family: var(--braves-font-mono);
}

/* ==================== CHANGELOG TIMELINE ==================== */
.braves-timeline {
    position: relative;
    padding: 0 0 var(--braves-space-lg) 0;
    max-width: 900px;
    /* Ancho máximo ajustado para centrar el bloque en resoluciones grandes */
    margin: 0 auto;
    /* Centra el timeline entero */
    /* Eliminado display: flex y gap para evitar colapso e inconsistencias nativas en alturas mixtas */
}

/* Línea vertical izquierda */
.braves-timeline::before {
    content: '';
    position: absolute;
    left: 48px;
    /* Centro del axis (ancho 96px) */
    top: 24px;
    /* Toca exactamente la caja contenedora de 'Today' */
    bottom: 0;
    border-left: 1px solid var(--braves-gray-200);
    /* Línea sólida delgada y elegante a lo ranomi */
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: none;
}

[data-braves-theme="dark"] .braves-timeline::before {
    border-left-color: var(--braves-gray-700);
}

/* Marcador "Hoy" */
.braves-timeline__cap {
    display: flex;
    width: 96px;
    /* Coincide con el ancho de la columna del eje temporal */
    justify-content: center;
    /* Alineación perfecta con el centro de la columna (donde está la línea trazada) */
    position: relative;
    z-index: 2;
    margin-bottom: var(--braves-space-md);
}

.braves-timeline__cap-label {
    background: var(--braves-text-primary);
    color: var(--braves-bg-page);
    border-radius: var(--braves-radius-full);
    padding: 4px 16px;
    font-size: var(--braves-text-xs);
    font-weight: var(--braves-font-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.5;
}

[data-braves-theme="dark"] .braves-timeline__cap-label {
    background: var(--braves-primary);
    color: var(--braves-text-on-primary);
}

/* Cada ítem del timeline */
.braves-timeline__item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: var(--braves-space-lg);
    position: relative;
    align-items: flex-start;
    opacity: 0;
    margin-bottom: 40vh;
    /* Respiración abismal simulando scroll de hito ranomi */
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

/* Fija ambos elementos siempre en la primera fila (Row 1) ignorando el orden en HTML */
.braves-timeline__item>* {
    grid-row: 1;
}

.braves-timeline__item.braves-item--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Eje de la izquierda (Badge + Fecha) */
.braves-timeline__axis {
    position: sticky;
    top: 40vh;
    /* Un poco más arriba del centro, permite lectura cómoda */
    height: 64px;
    /* Otorga un ancla para absolute positioning de sus hijos */
    z-index: 2;
    grid-column: 1;
}

/* El hito elegante (Punto blanco/secundario en lugar de raya unida) */
.braves-timeline__axis::before {
    content: '';
    position: absolute;
    left: 48px;
    /* Centro exacto sobre la línea vertical */
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    /* Incrementado para mayor prominencia */
    height: 12px;
    background: var(--braves-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 8px var(--braves-bg-page);
    /* Halo expandido para destacar más */
    z-index: 5;
}

[data-braves-theme="dark"] .braves-timeline__axis::before {
    background: var(--braves-text-primary);
}

/* Tipografía Rotada de Hito (Ex Badge) */
.braves-timeline__badge {
    position: absolute;
    right: 78px;
    /* Posicionado exactamente a 10px del centro (48px) hacia la izquierda */
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    transform-origin: right center;
    /* Pivota exactamente al nivel del centro vertical */
    font-size: 2.5rem;
    /* Enorme estilo watermark */
    font-family: var(--braves-font-sans);
    font-weight: 300;
    letter-spacing: 0.1em;
    color: var(--braves-text-muted);
    background: transparent !important;
    white-space: nowrap;
    opacity: 0.4;
    /* Sutil y elegante */
    z-index: 10;
}

[data-braves-theme="dark"] .braves-timeline__badge {
    color: var(--braves-gray-500);
}

/* ELIMINADA la conexión forzada horizonal y el theme dark innecesario */

.braves-timeline__label {
    position: absolute;
    left: 66px;
    /* Posicionado hacia la derecha de la linea */
    top: 170%;
    transform: translateY(-50%) rotate(-90deg);
    /* Mismo sentido que la versión para acompañar lectura */
    transform-origin: left center;
    font-size: 11px;
    font-weight: 500;
    color: var(--braves-text-muted);
    white-space: nowrap;
    margin: 0;
}

[data-braves-theme="dark"] .braves-timeline__label {
    color: var(--braves-primary);
}

/* Tarjeta (Derecha) */
.braves-timeline__card-side {
    grid-column: 2;
    position: relative;
    min-width: 0;
    max-width: 720px;
    z-index: 20;
}

/* ELIMINAMOS pseudo-elemento connecting line que estaba en ::before */

.braves-changelog__version {
    padding: var(--braves-space-lg);
    background: var(--braves-surface);
    border: 1px solid var(--braves-border-color);
    border-radius: var(--braves-radius-lg);
    box-shadow: var(--braves-shadow-sm);
}

.braves-changelog__title {
    font-size: var(--braves-text-base);
    font-weight: var(--braves-font-semibold);
    color: var(--braves-text-primary);
    margin: 0 0 var(--braves-space-md) 0;
    line-height: var(--braves-leading-normal);
}

.braves-changelog__section {
    margin-top: var(--braves-space-md);
}

.braves-changelog__section:first-child {
    margin-top: 0;
}

.braves-changelog__section h4 {
    font-size: var(--braves-text-xs);
    font-weight: var(--braves-font-semibold);
    color: var(--braves-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 var(--braves-space-xs) 0;
}

.braves-changelog__section ul {
    margin: 0;
    padding-left: var(--braves-space-lg);
}

.braves-changelog__section li {
    margin-bottom: var(--braves-space-xs);
    color: var(--braves-text-secondary);
    font-size: var(--braves-text-sm);
    line-height: var(--braves-leading-relaxed);
}

/* Mobile Timeline */
@media screen and (max-width: 768px) {
    .braves-timeline::before {
        left: 32px;
        /* Centro del axis (ancho 64px) */
    }

    .braves-timeline__item {
        grid-template-columns: 64px 1fr;
        gap: var(--braves-space-sm);
    }

    .braves-timeline__axis {
        margin-top: 18px;
    }

    .braves-timeline__cap {
        padding-left: 8px;
    }

    .braves-timeline__badge {
        font-size: 9px;
        padding: 3px 8px;
    }

    .braves-timeline__badge::after {
        width: var(--braves-space-sm);
    }
}

/* ==================== RESPONSIVE ==================== */
@media screen and (max-width: 1024px) {

    .braves-card-grid--3-cols,
    .braves-card-grid--4-cols {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 640px) {

    .braves-card-grid--2-cols,
    .braves-card-grid--3-cols,
    .braves-card-grid--4-cols {
        grid-template-columns: 1fr;
    }

    .braves-card {
        padding: var(--braves-space-lg);
    }

    .braves-button-group {
        flex-direction: column;
    }

    .braves-button {
        justify-content: center;
    }

    .braves-about-team {
        grid-template-columns: 1fr;
    }
}

/* ==================== ICON TABS (SELECTOR) ==================== */
.braves-icon-tabs {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: #f9fafb;
    border-radius: 12px;
}

.braves-icon-tab {
    flex: 1;
    cursor: pointer;
    position: relative;
}

.braves-icon-tab input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.braves-icon-tab__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: transparent;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.braves-icon-tab:hover .braves-icon-tab__content {
    background: var(--braves-surface);
}

.braves-icon-tab input[type="radio"]:checked+.braves-icon-tab__content {
    background: var(--braves-surface);
    border-color: #5B4CCC;
    box-shadow: 0 2px 8px rgba(91, 76, 204, 0.15);
}

.braves-icon-tab__content img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.braves-icon-tab__content span {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    line-height: 1.3;
}

.braves-icon-tab input[type="radio"]:checked+.braves-icon-tab__content span {
    color: #5B4CCC;
}

@media (max-width: 782px) {
    .braves-icon-tabs {
        flex-wrap: wrap;
    }

    .braves-icon-tab {
        flex: 0 0 calc(50% - 4px);
    }
}

/* ==================== COLOR PICKER WRAPPER ==================== */
.braves-color-picker-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.braves-color-picker {
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
}

.braves-color-picker::-webkit-color-swatch-wrapper {
    padding: 0 !important;
}

.braves-color-picker::-webkit-color-swatch {
    border: none !important;
    border-radius: 6px !important;
}

.braves-color-picker::-moz-color-swatch {
    border: none !important;
    border-radius: 6px !important;
}

.braves-color-picker:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

.braves-color-picker:active {
    transform: scale(0.98);
}

.braves-color-picker-label {
    font-size: var(--braves-text-xs);
    font-weight: var(--braves-font-medium);
    color: var(--braves-text-muted);
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

/* ==================== WELCOME MESSAGE PREVIEW ==================== */
.braves-admin-wrap .braves-message-preview {
    background: var(--braves-surface-alt) !important;
    border: 1px solid var(--braves-border-color);
    border-radius: var(--braves-radius-md);
    padding: 15px;
    margin-top: 10px;
    font-size: var(--braves-text-sm);
    line-height: var(--braves-leading-relaxed);
    color: var(--braves-text-primary) !important;
}

/* ==================== COLOR TEXT INPUT ==================== */
.braves-admin-wrap .braves-color-text {
    display: inline-block;
    vertical-align: middle;
    width: 200px;
    height: 40px;
    font-family: var(--braves-font-mono);
    text-transform: uppercase;
    font-size: var(--braves-text-sm);
    color: var(--braves-text-secondary) !important;
    padding: var(--braves-space-sm) var(--braves-space-md);
    border: 1px solid var(--braves-border-color);
    border-radius: var(--braves-radius-md);
    background: var(--braves-surface-alt) !important;
    margin-left: var(--braves-space-md);
    box-sizing: border-box;
}

/* ==================== PALETTE TOGGLE BUTTON ==================== */
.braves-palette-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--braves-space-sm);
    padding: var(--braves-space-sm) var(--braves-space-md);
    background: var(--braves-surface-alt);
    border: 1px solid var(--braves-border-color);
    border-radius: var(--braves-radius-md);
    color: var(--braves-text-secondary);
    font-size: var(--braves-text-sm);
    font-weight: var(--braves-font-medium);
    cursor: pointer;
    transition: all var(--braves-transition-base);
}

.braves-palette-toggle:hover {
    background: var(--braves-gray-100);
    border-color: var(--braves-gray-300);
    color: var(--braves-text-primary);
}

.braves-palette-toggle-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 10px;
    line-height: 1;
}

.braves-palette-toggle.braves-palette-toggle--expanded .braves-palette-toggle-icon {
    transform: rotate(90deg);
}

/* ==================== COLOR PALETTE PRESETS ==================== */
.braves-color-palette {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
}

.braves-color-palette--collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.braves-color-palette--expanded {
    max-height: 200px;
    opacity: 1;
    margin-top: var(--braves-space-md);
}

/* Botones de colores predefinidos */
.braves-color-preset {
    width: 40px;
    height: 40px;
    border: 2px solid var(--braves-border-color);
    border-radius: var(--braves-radius-md);
    cursor: pointer;
    padding: 0;
    transition: all var(--braves-transition-base);
    box-shadow: var(--braves-shadow-sm);
    position: relative;
    outline: none;
}

.braves-color-preset:hover {
    transform: scale(1.1);
    border-color: var(--braves-gray-400);
    box-shadow: var(--braves-shadow);
}

.braves-color-preset:active {
    transform: scale(0.95);
}

.braves-color-preset:focus {
    box-shadow: 0 0 0 3px var(--braves-primary-lighter);
}

/* ==================== CARD ROW (TITLE + ACTION INLINE) ==================== */
.braves-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--braves-space-md);
}

/* ==================== HISTORY TABLE ==================== */
.braves-history-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    font-family: inherit;
    font-size: 13px;
}

.braves-history-table thead tr {
    background: var(--braves-surface-alt);
}

.braves-history-table thead th {
    background: var(--braves-surface-alt);
    color: var(--braves-text-primary);
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--braves-border-color);
    border-right: none;
    border-left: none;
    box-shadow: none;
}

.braves-history-table tbody tr {
    background: var(--braves-surface);
    transition: background 0.15s ease;
}

.braves-history-table tbody tr:nth-child(even) {
    background: var(--braves-surface-alt);
}

/* El hover se gestiona por .braves-history-table-row:hover td */

.braves-history-table tbody td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--braves-border-color);
    border-right: none;
    border-left: none;
    color: var(--braves-text-primary);
    vertical-align: middle;
    line-height: 1.5;
}

.braves-history-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==================== HISTORY TABLE COLUMNS ==================== */
.braves-history-table__col-session {
    width: 160px;
    font-family: var(--braves-font-mono, monospace);
    font-size: 11px;
    word-break: break-all;
}

.braves-history-table__col-email {
    width: 190px;
    word-break: break-all;
}

.braves-history-table__col-message {
    white-space: normal;
    word-break: break-word;
}

.braves-history-table__col-date {
    width: 150px;
    white-space: nowrap;
}

/* Interactivity for table rows */
.braves-history-table tbody tr[data-chat-history] {
    cursor: pointer;
}

/* ==================== HISTORY TABLE CELL CONTENT ==================== */
.braves-history-table__contact-name {
    font-weight: 600;
}

.braves-history-table__snippet {
    font-style: italic;
}

.braves-history-table__date {
    display: flex;
    align-items: center;
    font-size: var(--braves-text-sm);
}

.braves-history-table__date-icon {
    margin-right: 6px;
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ==================== HISTORY CHAT MODAL ==================== */
.braves-history-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--braves-transition-normal, 0.3s ease), visibility var(--braves-transition-normal, 0.3s ease);
}

.braves-history-modal-overlay.braves-is-visible {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
}

.braves-history-modal-wrapper {
    position: relative;
    width: 90%;
    max-width: 600px;
}

.braves-history-modal {
    background: var(--braves-surface);
    width: 100%;
    height: 80vh;
    max-height: 800px;
    border: 1px solid var(--braves-primary);
    border-radius: var(--braves-radius-xl, 16px);
    box-shadow: 0 20px 40px -6px rgba(0, 119, 182, 0.4), 0 8px 16px -4px rgba(0, 119, 182, 0.25);
    display: flex;
    flex-direction: column;
    transform: translateY(24px) scale(0.97);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    overflow: hidden;
}

.braves-history-modal-overlay.braves-is-visible .braves-history-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.braves-history-modal__header {
    padding: var(--braves-space-lg, 24px) var(--braves-space-xl, 32px);
    border-bottom: 1px solid var(--braves-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--braves-surface-alt);
}

.braves-history-modal__title {
    margin: 0;
    font-size: var(--braves-text-lg, 18px);
    font-weight: var(--braves-font-semibold, 600);
    color: var(--braves-text-primary, #111827);
}

.braves-history-modal__subtitle {
    margin: 4px 0 0 0;
    font-size: var(--braves-text-sm, 14px);
    color: var(--braves-text-secondary, #6b7280);
    font-family: var(--braves-font-mono, monospace);
}


.braves-history-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--braves-space-xl, 32px);
    background: var(--braves-surface);
    display: flex;
    flex-direction: column;
    gap: var(--braves-space-md, 16px);
}

/* Chat bubble styles inside the modal */
.braves-history-chat-bubble {
    max-width: 80%;
    padding: 10px 14px 6px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    word-wrap: break-word;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.braves-history-bubble-content {
    display: block;
}

.braves-history-bubble-time {
    display: block;
    font-size: 10px;
    opacity: 0.65;
    text-align: right;
    line-height: 1;
    margin-top: 2px;
    letter-spacing: 0.02em;
}

.braves-history-chat-bubble--user {
    align-self: flex-end;
    background: var(--braves-primary, #0077b6);
    color: var(--braves-text-on-primary, #ffffff);
    border-bottom-right-radius: 4px;
}

.braves-history-chat-bubble--ai {
    align-self: flex-start;
    background: var(--braves-surface, #f3f4f6);
    color: var(--braves-text-primary, #111827);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--braves-gray-200, #e5e7eb);
}

.braves-history-chat-empty {
    text-align: center;
    color: var(--braves-text-secondary, #6b7280);
    margin-top: 40px;
    font-style: italic;
}

/* ==================== HISTORY PAGE: BENTO CARD ==================== */
.braves-bento-card {
    background: var(--braves-surface);
    border: 1px solid var(--braves-border-color);
    border-radius: var(--braves-radius-lg, 12px);
    box-shadow: var(--braves-shadow, 0 1px 3px rgba(0, 0, 0, 0.1));
    overflow: hidden;
    margin-bottom: 20px;
    font-family: var(--braves-font-sans, "Montserrat", sans-serif);
}

.braves-bento-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--braves-border-color);
}

.braves-bento-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--braves-text-primary);
}

/* ==================== HISTORY PAGE: TABLE OVERRIDES ==================== */
.braves-history-table {
    border-spacing: 0;
}

.braves-history-table th,
.braves-history-table td {
    text-align: left !important;
}

.braves-history-table thead th {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 14px;
    color: var(--braves-text-secondary);
    background: var(--braves-surface-alt);
    border-bottom: 1px solid var(--braves-border-color);
    text-transform: none;
    letter-spacing: normal;
}

.braves-history-table tbody td {
    padding: 16px 20px;
    font-size: 15px;
    color: var(--braves-text-primary);
    border-bottom: 1px solid var(--braves-border-color);
}

/* Row interactivity */
.braves-history-table-row {
    cursor: pointer;
    transition: all var(--braves-transition-fast);
}

.braves-history-table-row:hover {
    background: var(--braves-surface-alt) !important;
    color: var(--braves-primary);
    box-shadow: var(--braves-shadow-lg);
    transform: translateY(-2px);
}

.braves-history-table-row:hover td {
    color: var(--braves-primary) !important;
}

.braves-history-table-row:last-child td {
    border-bottom: none;
}

/* ==================== HISTORY PAGE: EXPORT BUTTON ==================== */
#braves-history-export-csv.button-primary {
    border-radius: var(--braves-radius-md, 8px);
    font-family: var(--braves-font-sans, "Montserrat", sans-serif);
    padding: 4px 16px;
    background-color: var(--braves-primary, #0077b6);
    border-color: var(--braves-primary, #0077b6);
    color: var(--braves-text-on-primary, #ffffff);
    box-shadow: var(--braves-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
    transition: background-color var(--braves-transition-fast, 0.2s);
}

#braves-history-export-csv.button-primary:hover,
#braves-history-export-csv.button-primary:active,
#braves-history-export-csv.button-primary:focus {
    background-color: var(--braves-primary-hover, #3c3c3c) !important;
    border-color: var(--braves-primary-hover, #3c3c3c) !important;
    color: var(--braves-text-on-primary, #ffffff);
}

/* ==================== HISTORY PAGE: MODAL FIXES ==================== */
.braves-history-modal__header {
    align-items: flex-start;
}

.braves-history-modal__header>div {
    flex: 1;
    min-width: 0;
}

.braves-history-modal__subtitle {
    word-break: break-all;
    margin: 5px 0 0 0;
    font-size: 12px;
}

/* Close button — outside the modal box */
.braves-history-modal__close {
    position: absolute;
    top: -36px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: none;
    border: none;
    color: var(--braves-white, #fff);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.braves-history-modal__close:hover {
    opacity: 1;
}

.braves-history-modal__close:focus {
    outline: none;
}

#braves-history-modal-body {
    padding: 20px;
    gap: 15px;
    background: var(--braves-surface-alt);
}

/* ==================== HISTORY PAGE: BUBBLE WRAPPERS ==================== */
.braves-history-bubble-wrap {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.braves-history-bubble-wrap--user {
    align-items: flex-end;
}

.braves-history-bubble-wrap--ai {
    align-items: flex-start;
}

.braves-history-chat-sender {
    font-size: 11px;
    font-weight: 600;
    color: var(--braves-gray-500, #6b7280);
    margin-bottom: 4px;
    padding: 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==================== HISTORY PAGE: BUBBLE STYLES ==================== */
.braves-history-chat-bubble {
    border-radius: 12px;
    box-shadow: var(--braves-shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
    word-break: break-word;
}

.braves-history-chat-bubble--user {
    background-color: var(--braves-primary, #0077b6);
    color: var(--braves-text-on-primary, #ffffff);
}

.braves-history-chat-bubble--user a {
    color: inherit;
    text-decoration: underline;
}

.braves-history-chat-bubble--ai {
    background-color: var(--braves-surface);
    color: var(--braves-text-primary);
    border: 1px solid var(--braves-border-color);
}

.braves-history-chat-bubble--ai a {
    color: var(--braves-primary, #0077b6);
    text-decoration: underline;
}

/* ==================== DARK MODE: TINYMCE OVERRIDES ==================== */
/* Tabs Visual / Código */
[data-braves-theme="dark"] .wp-editor-tabs .wp-switch-editor {
    background: var(--braves-surface-alt) !important;
    border-color: var(--braves-border-color) !important;
    color: var(--braves-text-secondary) !important;
}

[data-braves-theme="dark"] .wp-editor-wrap.tmce-active .switch-tmce,
[data-braves-theme="dark"] .wp-editor-wrap.html-active .switch-html {
    background: var(--braves-surface) !important;
    color: var(--braves-text-primary) !important;
    border-bottom-color: var(--braves-surface) !important;
}

/* Borde exterior del editor */
[data-braves-theme="dark"] .wp-editor-container {
    border: 1px solid var(--braves-border-color) !important;
    background: var(--braves-surface-alt) !important;
    box-shadow: none !important;
}

/* Toolbar container */
[data-braves-theme="dark"] .mce-tinymce.mce-container,
[data-braves-theme="dark"] .mce-panel,
[data-braves-theme="dark"] .mce-toolbar-grp,
[data-braves-theme="dark"] .mce-toolbar {
    background: var(--braves-surface-alt) !important;
    border: 1px solid var(--braves-border-color) !important;
    box-shadow: none !important;
}

/* Cuerpo interno y área de edición */
[data-braves-theme="dark"] .mce-container-body,
[data-braves-theme="dark"] .mce-edit-area {
    border-color: var(--braves-border-color) !important;
    box-shadow: none !important;
}

/* Botones de toolbar */
[data-braves-theme="dark"] .mce-btn {
    background: transparent !important;
    border-color: transparent !important;
}

[data-braves-theme="dark"] .mce-btn button,
[data-braves-theme="dark"] .mce-btn i,
[data-braves-theme="dark"] .mce-ico {
    color: var(--braves-text-secondary) !important;
}

[data-braves-theme="dark"] .mce-btn:hover,
[data-braves-theme="dark"] .mce-btn.mce-active {
    background: var(--braves-surface) !important;
    border-color: var(--braves-border-color) !important;
}

[data-braves-theme="dark"] .mce-btn:hover button,
[data-braves-theme="dark"] .mce-btn:hover i,
[data-braves-theme="dark"] .mce-btn.mce-active i {
    color: var(--braves-text-primary) !important;
}

/* Separadores entre grupos */
[data-braves-theme="dark"] .mce-btn-group:not(:first-child) {
    border-left-color: var(--braves-border-color) !important;
}

/* Statusbar (barra de resize inferior) */
[data-braves-theme="dark"] .mce-statusbar {
    background: var(--braves-surface-alt) !important;
    border-color: var(--braves-border-color) !important;
}

[data-braves-theme="dark"] .mce-path .mce-path-item,
[data-braves-theme="dark"] .mce-wordcount {
    color: var(--braves-text-muted) !important;
}

/* Barra de botones en modo Código (HTML) */
[data-braves-theme="dark"] .quicktags-toolbar {
    background: var(--braves-surface-alt) !important;
    border-bottom-color: var(--braves-border-color) !important;
}

[data-braves-theme="dark"] .quicktags-toolbar input.button,
[data-braves-theme="dark"] .quicktags-toolbar input.button-small {
    background: var(--braves-surface) !important;
    border-color: var(--braves-border-color) !important;
    color: var(--braves-text-secondary) !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

[data-braves-theme="dark"] .quicktags-toolbar input.button:hover,
[data-braves-theme="dark"] .quicktags-toolbar input.button-small:hover {
    background: var(--braves-surface-elevated) !important;
    color: var(--braves-text-primary) !important;
}

/* Textarea en modo Código (HTML) */
[data-braves-theme="dark"] .wp-editor-area {
    background: var(--braves-surface-alt) !important;
    color: var(--braves-text-primary) !important;
    border-color: var(--braves-border-color) !important;
}

/* ==================== DARK MODE: WP .button OVERRIDES ==================== */
[data-braves-theme="dark"] .braves-media-uploader .button {
    background-color: var(--braves-surface-alt) !important;
    border-color: var(--braves-border-color) !important;
    color: var(--braves-text-primary) !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

[data-braves-theme="dark"] .braves-media-uploader .button:hover {
    background-color: var(--braves-surface) !important;
    border-color: var(--braves-text-muted) !important;
    color: var(--braves-text-primary) !important;
}

/* Media uploader wrapper */
.braves-media-preview-wrapper {
    margin-bottom: 10px;
}

.braves-hidden {
    display: none;
}

.braves-ml-sm {
    margin-left: 5px;
}

.braves-mt-sm {
    margin-top: 5px;
}

/* Media preview image */
.braves-media-preview {
    max-width: 100px;
    max-height: 100px;
    border-radius: var(--braves-radius-md);
    border: 1px solid var(--braves-border-color);
    display: block;
}

[data-braves-theme="dark"] .braves-media-preview {
    border-color: var(--braves-border-color);
    background-color: var(--braves-surface-alt);
}