/* yonOut – stili area riservata */

.yonout-auth-body,
.yonout-app-body {
    min-height: 100vh;
    background: #eef2f0;
    font-family: 'Kanit', sans-serif;
    color: #3d4a44;
}

.yonout-app-body h1,
.yonout-app-body h2,
.yonout-app-body h3,
.yonout-app-body h4,
.yonout-app-body h5,
.yonout-app-body h6,
.yonout-auth-body h1,
.yonout-auth-body h2,
.yonout-auth-body h3,
.yonout-auth-body h4,
.yonout-auth-body h5,
.yonout-auth-body h6 {
    font-weight: 600;
}

/* h1 di pagina nascosti: il breadcrumb in header li sostituisce. Rimuovere per ripristinarli. */
.yonout-app-body h1 {
    display: none;
}

.yonout-theme-shell .yonout-theme-heading h1 {
    display: block;
}

.yonout-theme-breadcrumb a {
    color: inherit;
}

.yonout-theme-breadcrumb a:hover,
.yonout-theme-breadcrumb a:focus {
    text-decoration: underline;
}

.yonout-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.yonout-auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.yonout-brand {
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #37B753;
    font-weight: 500;
}

.yonout-form .form-control {
    border-radius: 8px;
    border-color: #d4ddd8;
}


.yonout-app-body .yonout-input-text,
.yonout-auth-body .yonout-input-text {
    --yonout-text-input-empty-bg: #eef2f0;
    --yonout-text-input-empty-border: #d8dfdb;
    --yonout-text-input-filled-bg: #ffffff;
    --yonout-text-input-filled-border: #e1e8e4;
    background-color: var(--yonout-text-input-empty-bg) !important;
    border: 1px solid var(--yonout-text-input-empty-border) !important;
    color: #3d4a44;
}

.yonout-app-body .yonout-input-text.yonout-input-text--filled,
.yonout-auth-body .yonout-input-text.yonout-input-text--filled {
    background-color: var(--yonout-text-input-filled-bg) !important;
    border-color: var(--yonout-text-input-filled-border) !important;
}

.yonout-form .form-control:focus {
    border-color: #37B753;
    box-shadow: 0 0 0 0.2rem rgba(55, 183, 83, 0.15);
}

/* Pulsanti yonOut (stile btn-verde-w, dimensioni personalizzate) */

.btn-yonout,
.btn-yonout-verde,
.btn-yonout-verde:visited,
.btn-yonout-grigio,
.btn-yonout-grigio:visited,
.btn-yonout-arancione,
.btn-yonout-arancione:visited,
.btn-yonout-rosso,
.btn-yonout-rosso:visited,
.btn-yonout-blu,
.btn-yonout-blu:visited,
.btn-yonout-nero,
.btn-yonout-nero:visited {
    font-size: 14px;
    padding: 4px 16px !important;
    border: 0.05rem solid #fefefe !important;
    border-radius: 100px !important;
    text-align: center;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.25);
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    line-height: 1.4;
    font-weight: 400;
}

/* Verde */
.btn-yonout,
.btn-yonout-verde,
.btn-yonout-verde:visited {
    color: #ffffff;
    background-color: #37B753;
}

.btn-yonout:hover,
.btn-yonout:active,
.btn-yonout:focus,
.btn-yonout-verde:hover,
.btn-yonout-verde:active,
.btn-yonout-verde:focus {
    color: #51D66B;
    background-color: #ffffff;
    border: 0.05rem solid #fefefe !important;
}

/* Grigio chiaro */
.btn-yonout-grigio,
.btn-yonout-grigio:visited {
    color: #3d4f46;
    background-color: #e8eeeb;
}

.btn-yonout-grigio:hover,
.btn-yonout-grigio:active,
.btn-yonout-grigio:focus {
    color: #3d4f46;
    background-color: #ffffff;
    border: 0.05rem solid #e0e8e4 !important;
}

/* Arancione */
.btn-yonout-arancione,
.btn-yonout-arancione:visited {
    color: #ffffff;
    background-color: #f28506;
}

.btn-yonout-arancione:hover,
.btn-yonout-arancione:active,
.btn-yonout-arancione:focus {
    color: #f29020;
    background-color: #ffffff;
    border: 0.05rem solid #fefefe !important;
}

/* Rosso */
.btn-yonout-rosso,
.btn-yonout-rosso:visited {
    color: #ffffff;
    background-color: #d32f2f;
}

.btn-yonout-rosso:hover,
.btn-yonout-rosso:active,
.btn-yonout-rosso:focus {
    color: #e57373;
    background-color: #ffffff;
    border: 0.05rem solid #fefefe !important;
}

/* Blu */
.btn-yonout-blu,
.btn-yonout-blu:visited {
    color: #ffffff;
    background-color: #1976d2;
}

.btn-yonout-blu:hover,
.btn-yonout-blu:active,
.btn-yonout-blu:focus {
    color: #42a5f5;
    background-color: #ffffff;
    border: 0.05rem solid #fefefe !important;
}

/* Nero */
.btn-yonout-nero,
.btn-yonout-nero:visited {
    color: #ffffff;
    background-color: #121212;
}

.btn-yonout-nero:hover,
.btn-yonout-nero:active,
.btn-yonout-nero:focus {
    color: #121212;
    background-color: #ffffff;
    border: 0.05rem solid #fefefe !important;
}

/* CTA large (gestione) */
.btn-yonout-lg,
.btn-yonout-lg:visited {
    padding: 20px 80px !important;
    font-size: 20px;
    font-weight: 600;
    border-radius: 0 !important;
}

.yonout-app-header {
    background: #fff;
    border-bottom: 1px solid #e2e8e5;
}

.yonout-app-header__brand {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

.btn-yonout-back-yon {
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-yonout-back-yon i {
    font-size: 18px;
    line-height: 1;
}

.yonout-back-yon__label {
    font-weight: 500;
}

@media (max-width: 575.98px) {
    .yonout-back-yon__label {
        display: none;
    }
}

.yonout-app-breadcrumb {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-left: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid #d4ddd8;
    font-weight: 400;
    font-size: inherit;
}

.yonout-app-breadcrumb-link {
    color: #1976d2;
    text-decoration: none;
}

.yonout-app-breadcrumb-link:hover,
.yonout-app-breadcrumb-link:focus {
    color: #1565c0;
    text-decoration: underline;
}

.yonout-app-breadcrumb-current {
    color: #3d4f46;
}

.yonout-app-breadcrumb-sep {
    color: #9aa8a0;
}

.yonout-app-main {
    min-height: calc(100vh - 72px);
}

.yonout-welcome {
    background: #fff;
}

/* Dashboard – pannello contenuti */

.yonout-dashboard-panel {
    background: transparent;
}

.yonout-dashboard-filters .btn.is-active,
.yonout-dashboard-filters .btn[aria-current="page"] {
    box-shadow: inset 0 0 0 2px #121212;
}

.yonout-content-base-settings {
    background: transparent;
    margin-bottom: 1.5rem;
}

.yonout-content-base-settings .form-text {
    color: #5a6b63;
    word-break: break-all;
}

span.btn-yonout-verde.is-disabled,
span.btn-yonout-verde.is-disabled:hover,
span.btn-yonout-verde.is-disabled:focus {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    filter: none;
}

.yonout-dashboard-filters .btn i {
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
}

.yonout-dashboard-head h1 {
    font-weight: 600;
    color: #3d4a44;
}

.yonout-table thead th {
    font-size: 13px;
    font-weight: 500;
    color: #5a6b63;
    border-bottom-width: 2px;
    white-space: nowrap;
}

.yonout-table tbody td {
    font-size: 14px;
    vertical-align: middle;
}

.yonout-col-tipo {
    width: 72px;
}

.yonout-col-origine {
    width: 100px;
    white-space: nowrap;
}

.yonout-origin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
}

.yonout-origin__yon-logo {
    height: 36px;
    width: auto;
    display: block;
}

.yonout-origin__wp.dashicons {
    width: 28px;
    height: 28px;
    font-size: 28px;
    line-height: 1;
    color: #21759b;
    flex-shrink: 0;
}

.yonout-origin__lock {
    color: #dc3545;
    font-size: 20px;
    line-height: 1;
}

.yonout-wp-edit-warning {
    color: #dc3545;
}

.yonout-col-stato {
    width: 120px;
    white-space: nowrap;
}

.yonout-col-azioni {
    min-width: 140px;
}

.yonout-badge-tipo {
    display: inline-block;
    min-width: 40px;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.yonout-badge-tipo-post {
    color: #ffffff;
    background-color: #f28506;
}

.yonout-badge-tipo-page {
    color: #ffffff;
    background-color: #1976d2;
}

.yonout-badge-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.yonout-badge-status-publish {
    color: #1b5e20;
    background-color: #e8f5e9;
}

.yonout-badge-status-draft {
    color: #5a6b63;
    background-color: #eef2f0;
}

.yonout-badge-status-pending {
    color: #e65100;
    background-color: #fff3e0;
}

.yonout-badge-status-private {
    color: #4527a0;
    background-color: #ede7f6;
}

.yonout-badge-status-future {
    color: #0d47a1;
    background-color: #e3f2fd;
}

.yonout-badge-status-default {
    color: #5a6b63;
    background-color: #f5f5f5;
}

.yonout-item-title {
    font-weight: 400;
    color: #3d4a44;
}

.yonout-actions .btn {
    white-space: nowrap;
}

/* Pulsanti azione solo icona (Phosphor Light) */

.btn-yonout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 4px 10px !important;
}

.btn-yonout-icon i {
    font-size: 18px;
    line-height: 1;
    pointer-events: none;
}

.yonout-nuovo-contenuto,
.yonout-content-form-wrap {
    background: #fff;
}

.yonout-content-form-wrap.yonout-tipo-post .yonout-content-form > .border-bottom {
    border-bottom-color: #f28506;
}

.yonout-content-form-wrap.yonout-tipo-page .yonout-content-form > .border-bottom {
    border-bottom-color: #1976d2;
}

/* Form orizzontale (Bootstrap horizontal form) */

.yonout-content-form .col-form-label {
    font-size: 14px;
    font-weight: 500;
    color: #3d4a44;
}

@media (max-width: 767.98px) {
    .yonout-content-form .col-form-label {
        margin-bottom: 0.35rem;
    }
}

.yonout-content-form .form-control {
    border-radius: 8px;
    font-size: 14px;
}

.yonout-content-form .form-select {
    border-radius: 8px;
    font-size: 14px;
    width: fit-content;
    max-width: 100%;
}

.yonout-content-form .form-control:focus,
.yonout-content-form .form-select:focus {
    background-color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(55, 183, 83, 0.15);
}

.yonout-content-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    width: 100%;
}

.yonout-content-form-modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    width: 100%;
    border-top-color: #e8eeeb;
}

/* Form contenuto – riassunto, evidenza, categoria */

.yonout-post-meta-row {
    align-items: flex-start;
}

.yonout-post-meta-field {
    min-width: 0;
}

.yonout-post-meta-field .form-label {
    font-weight: 500;
    color: #5a6b63;
}

.yonout-post-meta-field .yonout-excerpt-editor {
    min-height: calc(1.5em * 3 + 1rem);
}

.yonout-featured-preview-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.yonout-featured-preview {
    width: 100%;
    max-width: 200px;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    background-color: #eef2f0;
    border: 1px solid #e0e8e4;
}

.yonout-featured-preview-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yonout-featured-preview-empty {
    margin-bottom: 0 !important;
}

@media (min-width: 992px) {
    .yonout-post-meta-field {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .yonout-post-meta-field .yonout-wysiwyg,
    .yonout-post-meta-field .yonout-image-source-section,
    .yonout-post-meta-field #yonout-category {
        flex: 1 1 auto;
    }
}

/* Riassunto – editor WYSIWYG */

.yonout-wysiwyg-toolbar .yonout-wysiwyg-btn,
.yonout-blocco-toolbar .yonout-wysiwyg-btn {
    border: 1px solid #e0e8e4;
    color: #3d4f46;
}

.yonout-wysiwyg-toolbar .yonout-wysiwyg-btn:hover,
.yonout-wysiwyg-toolbar .yonout-wysiwyg-btn:focus,
.yonout-blocco-toolbar .yonout-wysiwyg-btn:hover,
.yonout-blocco-toolbar .yonout-wysiwyg-btn:focus {
    background-color: #fff;
    border-color: #37b753;
    color: #2d9a45;
}

.yonout-wysiwyg-toolbar .yonout-wysiwyg-btn.active,
.yonout-blocco-toolbar .yonout-wysiwyg-btn.active {
    background-color: #37b753;
    border-color: #37b753;
    color: #fff;
}

.yonout-wysiwyg-toolbar .yonout-wysiwyg-btn i {
    font-size: 1.15rem;
    line-height: 1;
}

.yonout-wysiwyg-toolbar .yonout-wysiwyg-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.yonout-blocco-text-editor a,
.yonout-blocco-text-editor a:visited,
.yonout-blocco-text-editor a:focus,
.yonout-blocco-text-content a,
.yonout-blocco-text-content a:visited,
.yonout-blocco-text-content a:focus,
.yonout-blocco-body a,
.yonout-blocco-body a:visited,
.yonout-blocco-body a:focus {
    text-decoration: none;
    color: #37B753;
    transition: all 0.3s;
}

.yonout-blocco-text-editor a:hover,
.yonout-blocco-text-editor a:active,
.yonout-blocco-text-content a:hover,
.yonout-blocco-text-content a:active,
.yonout-blocco-body a:hover,
.yonout-blocco-body a:active {
    text-decoration: none;
    color: #51D66B;
    transition: all 0.3s;
}

.yonout-excerpt-editor {
    min-height: calc(1.5em * 4 + 1rem);
    overflow-y: auto;
    font-family: inherit;
    font-weight: inherit;
    line-height: 1.5;
    cursor: text;
    word-break: break-word;
}

.yonout-excerpt-editor:focus {
    background-color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(55, 183, 83, 0.15);
    outline: 0;
}

.yonout-excerpt-editor.is-empty:before {
    content: attr(data-placeholder);
    color: #9aa8a0;
    pointer-events: none;
}

.yonout-excerpt-editor strong,
.yonout-excerpt-editor b {
    font-weight: 600;
}

.yonout-excerpt-editor em,
.yonout-excerpt-editor i {
    font-style: italic;
}

/* Blocco — editor testo modale */

.yonout-blocco-modal .yonout-wysiwyg-toolbar .yonout-wysiwyg-btn-label {
    min-width: 2.25rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
}

.yonout-blocco-modal .yonout-wysiwyg-toolbar .yonout-wysiwyg-btn-label em {
    font-style: italic;
    font-weight: inherit;
}

.yonout-blocco-text-editor {
    min-height: 14rem;
    max-height: 50vh;
    overflow-y: auto;
    font-family: inherit;
    font-weight: inherit;
    line-height: 1.5;
    cursor: text;
    word-break: break-word;
    color: #000000;
}

.yonout-blocco-text-editor.yonout-blocco-text-tone-white,
.yonout-blocco-text-content.yonout-blocco-text-tone-white {
    color: #ffffff;
}

.yonout-blocco-text-editor.yonout-blocco-text-tone-black,
.yonout-blocco-text-content.yonout-blocco-text-tone-black {
    color: #000000;
}

.yonout-blocco-text-editor.yonout-blocco-text-tone-white {
    background-color: #3d4f46;
}

.yonout-blocco-text-editor.yonout-blocco-text-tone-white:focus {
    background-color: #3d4f46 !important;
}

.yonout-blocco-text-editor.yonout-blocco-text-has-shadow,
.yonout-blocco-text-content.yonout-blocco-text-has-shadow {
    text-shadow:
        0 1px 2px rgba(0, 0, 0, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.25);
}

.yonout-blocco-text-editor.yonout-blocco-text-tone-white.yonout-blocco-text-has-shadow,
.yonout-blocco-text-content.yonout-blocco-text-tone-white.yonout-blocco-text-has-shadow {
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.55),
        0 2px 10px rgba(0, 0, 0, 0.4);
}

.yonout-blocco-text-editor:focus {
    background-color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(55, 183, 83, 0.15);
    outline: 0;
}

.yonout-blocco-text-editor.is-empty:before {
    content: attr(data-placeholder);
    color: #9aa8a0;
    pointer-events: none;
}

.yonout-blocco-text-editor h2,
.yonout-blocco-text-editor h3,
.yonout-blocco-text-editor h4 {
    display: block;
    font-weight: 600;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.yonout-blocco-text-editor h2 {
    font-size: 1.5rem;
}

.yonout-blocco-text-editor h3 {
    font-size: 1.25rem;
}

.yonout-blocco-text-editor h4 {
    font-size: 1.0625rem;
}

.yonout-blocco-text-editor ul,
.yonout-blocco-text-editor ol {
    margin: 0 0 0.75rem;
    padding-left: 1.5rem;
}

.yonout-blocco-text-editor li {
    margin-bottom: 0.25rem;
}

.yonout-blocco-text-editor strong,
.yonout-blocco-text-editor b {
    font-weight: 600;
}

.yonout-blocco-text-editor em,
.yonout-blocco-text-editor i {
    font-style: italic;
}

.yonout-blocco-body h2,
.yonout-blocco-body h3,
.yonout-blocco-body h4,
.yonout-blocco-text-content h2,
.yonout-blocco-text-content h3,
.yonout-blocco-text-content h4 {
    display: block;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.yonout-blocco-body h2,
.yonout-blocco-text-content h2 {
    font-size: 1.5rem;
}

.yonout-blocco-body h3,
.yonout-blocco-text-content h3 {
    font-size: 1.25rem;
}

.yonout-blocco-body h4,
.yonout-blocco-text-content h4 {
    font-size: 1.0625rem;
}

.yonout-blocco-modal .yonout-modal-btn-save,
.yonout-blocco-modal .yonout-modal-btn-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
}

.yonout-blocco-modal .yonout-modal-btn-save i,
.yonout-blocco-modal .yonout-modal-btn-cancel i {
    font-size: 1.25rem;
    line-height: 1;
}

.yonout-blocco-body ul,
.yonout-blocco-body ol,
.yonout-blocco-text-content ul,
.yonout-blocco-text-content ol {
    margin: 0;
    padding-left: 1.5rem;
}

/* Blocco — modale immagine */

#yonout-modal-image .modal-body {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

#yonout-modal-image .yonout-image-alt-field {
    display: block;
}

#yonout-modal-image .yonout-image-alt-field .form-label {
    font-weight: 500;
    color: #5a6b63;
}

#yonout-modal-image .yonout-image-alt-field .form-control {
    width: 100%;
}

.yonout-image-source-tabs {
    margin-bottom: 0;
}

.yonout-image-source-panels {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-top: 0;
    border-radius: 0 0 0.375rem 0.375rem;
    background: #fff;
}

.yonout-image-library-grid {
    display: grid;
    grid-template-columns: repeat(5, 140px);
    grid-template-rows: repeat(2, 140px);
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 0.75rem;
    min-height: calc(140px * 2 + 0.75rem);
}

.yonout-image-library-item {
    display: block;
    width: 140px;
    height: 140px;
    padding: 0;
    border: 2px solid #e0e8e4;
    border-radius: 8px;
    background: #f8faf9;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.yonout-image-library-item:hover,
.yonout-image-library-item:focus {
    border-color: #37b753;
    outline: 0;
}

.yonout-image-library-item.is-selected {
    border-color: #37b753;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #37b753;
}

.yonout-image-library-item-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yonout-image-library-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.yonout-image-library-page-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.yonout-image-library-page-info {
    min-width: 7rem;
    text-align: center;
}

@media (max-width: 767.98px) {
    .yonout-image-library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-rows: auto;
        justify-content: stretch;
        min-height: 0;
    }

    .yonout-image-library-item {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* jscolorpicker: default z-index 1055 = Bootstrap modal → dialog dietro la modale */
.cp_dialog {
    z-index: 1065 !important;
}

.yonout-image-bg-fit-toolbar .yonout-image-bg-fit-btn.active,
.yonout-image-bg-fit-toolbar .yonout-image-bg-fit-btn.is-active {
    background-color: #37b753;
    border-color: #37b753;
    color: #fff;
}

.yonout-image-zoom-wrap {
    min-width: 6.5rem;
}

.yonout-image-zoom-wrap .form-select.is-active {
    border-color: #37b753;
    box-shadow: 0 0 0 0.2rem rgba(55, 183, 83, 0.15);
}

.yonout-image-bg-picker-native,
.yonout-text-color-picker-native {
    position: fixed;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.yonout-text-color-picker-btn {
    color: #fff !important;
    border-color: #e0e8e4 !important;
}

.yonout-image-bg-color-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    color: #fff;
    background-color: #e8eeeb;
    border: 2px solid #e0e8e4;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}

.yonout-image-bg-color-btn:hover,
.yonout-image-bg-color-btn:focus {
    border-color: #37b753;
    transform: scale(1.05);
    outline: 0;
}

.yonout-image-bg-color-btn i {
    font-size: 1.25rem;
    line-height: 1;
}

.yonout-image-dropzone {
    position: relative;
    min-height: 10rem;
    padding: 1.25rem;
    border: 2px dashed #dce4e0;
    border-radius: 8px;
    background: #f8faf9;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.yonout-image-dropzone:hover,
.yonout-image-dropzone.is-dragover,
.yonout-image-dropzone:focus {
    border-color: #37b753;
    background: #f0f7f2;
    outline: 0;
}

.yonout-image-dropzone-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6b7f75;
    font-size: 0.875rem;
}

.yonout-image-dropzone-empty i {
    font-size: 2rem;
    color: #37b753;
}

.yonout-image-dropzone-preview {
    max-height: 14rem;
    overflow: hidden;
    border-radius: 6px;
}

.yonout-image-dropzone-img {
    display: block;
    max-width: 100%;
    max-height: 14rem;
    margin: 0 auto;
    object-fit: contain;
}

.yonout-blocco-image-block {
    position: relative;
    width: 100%;
    min-height: 12rem;
    overflow: hidden;
    border-radius: 6px;
}

.yonout-blocco-col.yonout-blocco-col-has-bg,
.yonout-blocco-col[style*="--yonout-col-bg-url"],
.yonout-blocco-col[style*="background-image"],
.yonout-blocco-col[style*="background-color"] {
    background-position: center;
    background-repeat: no-repeat;
}

/*
 * Colonne blocco a larghezza parziale: stessa altezza della colonna più alta
 * nella riga (anche se hanno solo colore di sfondo e nessun testo/foto).
 */
.row:has(> .yonout-blocco-col),
.yonout-blocco-preview-rows:has(> .yonout-blocco-col) {
    align-items: stretch;
}

.yonout-blocco-col {
    display: flex;
    flex-direction: column;
}

.yonout-blocco-col > .yonout-blocco-shell {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
}

.yonout-blocco-col > .yonout-blocco-shell > .yonout-blocco-body {
    flex: 1 1 auto;
}

@media (min-width: 768px) {
    .yonout-blocco-col.yonout-blocco-col-has-bg,
    .yonout-blocco-col[style*="--yonout-col-bg-url"],
    .yonout-blocco-col[style*="background-image"],
    .yonout-blocco-col[style*="background-color"] {
        min-height: 12rem;
    }

    /* Non full-width: resta agganciata all'altezza della riga flex */
    .yonout-blocco-col[class*="col-md-"]:not(.col-md-12).yonout-blocco-col-has-bg,
    .yonout-blocco-col[class*="col-md-"]:not(.col-md-12)[style*="background-color"],
    .yonout-blocco-col[class*="col-md-"]:not(.col-md-12)[style*="background-image"],
    .yonout-blocco-col[class*="col-md-"]:not(.col-md-12)[style*="--yonout-col-bg-url"] {
        align-self: stretch;
    }

    .yonout-blocco-col[style*="--yonout-col-bg-url"]:not([style*="background-image"]) {
        background-image: var(--yonout-col-bg-url);
        background-size: var(--yonout-col-bg-size, cover);
    }
}

.yonout-blocco-col-has-bg > .yonout-blocco-shell,
.yonout-blocco-col-has-bg > .yonout-blocco-shell > .yonout-blocco-body,
.yonout-blocco-col[style*="--yonout-col-bg-url"] > .yonout-blocco-shell,
.yonout-blocco-col[style*="--yonout-col-bg-url"] > .yonout-blocco-shell > .yonout-blocco-body,
.yonout-blocco-col[style*="background-image"] > .yonout-blocco-shell,
.yonout-blocco-col[style*="background-image"] > .yonout-blocco-shell > .yonout-blocco-body,
.yonout-blocco-col[style*="background-color"] > .yonout-blocco-shell,
.yonout-blocco-col[style*="background-color"] > .yonout-blocco-shell > .yonout-blocco-body,
.yonout-blocco-col[data-yonout-bg-color] > .yonout-blocco-shell,
.yonout-blocco-col[data-yonout-bg-color] > .yonout-blocco-shell > .yonout-blocco-body {
    background: transparent;
}

.yonout-blocco-col-has-bg .yonout-blocco-image-fill,
.yonout-blocco-col[style*="--yonout-col-bg-url"] .yonout-blocco-image-fill,
.yonout-blocco-col[style*="background-image"] .yonout-blocco-image-fill,
.yonout-blocco-col[style*="background-color"] .yonout-blocco-image-fill,
.yonout-blocco-col[data-yonout-bg-color] .yonout-blocco-image-fill {
    display: none;
}

.yonout-blocco-col-has-bg .yonout-blocco-image-block[data-yonout-image-mode="background"],
.yonout-blocco-col[style*="--yonout-col-bg-url"] .yonout-blocco-image-block[data-yonout-image-mode="background"],
.yonout-blocco-col[style*="background-color"] .yonout-blocco-image-block[data-yonout-image-mode="background"],
.yonout-blocco-col[data-yonout-bg-color] .yonout-blocco-image-block[data-yonout-image-mode="background"] {
    background-color: transparent !important;
    background-image: none !important;
}

@media (max-width: 767.98px) {
    .yonout-blocco-col.yonout-blocco-col-has-bg:has(.yonout-blocco-image-mobile),
    .yonout-blocco-col[style*="--yonout-col-bg-url"]:has(.yonout-blocco-image-mobile),
    .yonout-blocco-col[style*="background-image"]:has(.yonout-blocco-image-mobile) {
        background-image: none !important;
        background-color: transparent !important;
        min-height: auto;
    }

    .yonout-blocco-col-has-bg:has(.yonout-blocco-image-mobile) .yonout-blocco-image-block,
    .yonout-blocco-col[style*="--yonout-col-bg-url"]:has(.yonout-blocco-image-mobile) .yonout-blocco-image-block,
    .yonout-blocco-col[style*="background-image"]:has(.yonout-blocco-image-mobile) .yonout-blocco-image-block {
        min-height: auto;
    }
}

.yonout-blocco-image-fill {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
}

.yonout-blocco-image-inline .img-fluid {
    display: block;
    width: 100%;
    height: auto;
}

.yonout-blocco-body:has(> .yonout-blocco-image-block) {
    padding: 0;
}

.yonout-blocco-text-content {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 12rem;
    padding: 0.75rem 1rem;
    overflow: auto;
    word-break: break-word;
}

/* Blocco — composizione contenuto */

.yonout-blocco-preview {
    min-height: 12rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e8eeeb;
    border-radius: 8px;
    word-break: break-word;
}

.yonout-blocco-shell {
    overflow: hidden;
    border: 1px solid #e0e8e4;
    padding: 0.25rem;
}

#yonout-blocco-tool .yonout-blocco-shell.is-tool {
    background-color: #fff;
    border: 3px solid #d99d9d;
}

.yonout-blocco-shell.yonout-blocco-instance {
    background-color: #fff;
    border: none;
    border-radius: 0;
    padding: 0;
}

.yonout-blocco-col.yonout-blocco-col-has-bg > .yonout-blocco-shell.yonout-blocco-instance,
.yonout-blocco-col[style*="--yonout-col-bg-url"] > .yonout-blocco-shell.yonout-blocco-instance,
.yonout-blocco-col[style*="background-image"] > .yonout-blocco-shell.yonout-blocco-instance,
.yonout-blocco-col[style*="background-color"] > .yonout-blocco-shell.yonout-blocco-instance,
.yonout-blocco-col[data-yonout-bg-color] > .yonout-blocco-shell.yonout-blocco-instance {
    background-color: transparent;
}

.yonout-blocco-shell.yonout-blocco-instance.rounded,
.yonout-blocco-shell.yonout-blocco-instance.rounded-2,
.yonout-blocco-shell.yonout-blocco-instance .yonout-blocco-image-block,
.yonout-blocco-shell.yonout-blocco-instance .yonout-blocco-image-fill,
.yonout-blocco-shell.yonout-blocco-instance .yonout-blocco-image-inline,
.yonout-blocco-shell.yonout-blocco-instance .yonout-blocco-image-inline .img-fluid {
    border-radius: 0;
}

.yonout-blocco-instance {
    margin-bottom: 0;
}

.yonout-blocco-shell.yonout-blocco-instance .yonout-blocco-body {
    position: relative;
}

.yonout-blocco-shell.yonout-blocco-instance .yonout-blocco-body .yonout-blocco-toolbar,
.yonout-blocco-shell.yonout-blocco-instance .yonout-blocco-body .yonout-blocco-toolbar-toggle {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 5;
    margin: 0;
}

.yonout-blocco-shell.yonout-blocco-instance.is-toolbar-closed .yonout-blocco-body .yonout-blocco-toolbar {
    display: none;
}

.yonout-blocco-shell.yonout-blocco-instance.is-toolbar-closed .yonout-blocco-body .yonout-blocco-toolbar-toggle {
    display: inline-flex;
}

.yonout-blocco-shell.yonout-blocco-instance.is-toolbar-open .yonout-blocco-body .yonout-blocco-toolbar-toggle {
    display: none;
}

.yonout-blocco-shell.yonout-blocco-instance.is-toolbar-open .yonout-blocco-body .yonout-blocco-toolbar {
    display: block;
    max-width: calc(100% - 0.5rem);
}

.yonout-blocco-shell.yonout-blocco-instance .yonout-blocco-body .yonout-blocco-toolbar-toggle {
    display: none;
}

.yonout-blocco-toolbar .btn-group {
    display: inline-flex;
    flex-wrap: nowrap;
    width: auto;
    max-width: 100%;
    vertical-align: top;
}

.yonout-blocco-toolbar .yonout-wysiwyg-btn,
.yonout-blocco-toolbar .yonout-blocco-btn-confirm {
    flex: 0 0 auto;
    width: auto;
}

.yonout-blocco-toolbar .yonout-wysiwyg-btn,
.yonout-blocco-toolbar .yonout-blocco-btn-confirm {
    border: 1px solid #e0e8e4;
    color: #3d4f46;
}

.yonout-blocco-toolbar .yonout-blocco-btn-confirm {
    background-color: #e8f5eb;
}

.yonout-blocco-toolbar .yonout-wysiwyg-btn:hover,
.yonout-blocco-toolbar .yonout-wysiwyg-btn:focus,
.yonout-blocco-toolbar .yonout-blocco-btn-confirm:hover,
.yonout-blocco-toolbar .yonout-blocco-btn-confirm:focus {
    background-color: #fff;
    border-color: #37b753;
    color: #2d9a45;
}

.yonout-blocco-toolbar .yonout-blocco-btn-confirm:hover,
.yonout-blocco-toolbar .yonout-blocco-btn-confirm:focus {
    background-color: #dff0e3;
}

.yonout-blocco-toolbar .yonout-wysiwyg-btn i,
.yonout-blocco-toolbar .yonout-blocco-btn-confirm i {
    font-size: 20px;
    line-height: 1;
}

.yonout-blocco-body {
    min-height: 2rem;
    padding: 0.75rem 1rem;
}

.yonout-blocco-empty-label {
    display: block;
    margin: 0;
    font-style: italic;
    color: #7a8a82;
}

.yonout-blocco-modulo {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    border: 1px dashed #9bb0a6;
    background: #f3f7f5;
    color: #1f2a24;
}

.yonout-blocco-modulo-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.yonout-blocco-carosello {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.75rem 1rem;
    border: 1px dashed #9bb0a6;
    background: #f3f7f5;
    color: #1f2a24;
}

.yonout-blocco-carosello-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.yonout-blocco-preview-rows {
    min-height: 1px;
}

.yonout-layout-table th {
    font-weight: 500;
    color: #3d4f46;
}

.yonout-layout-desc-title {
    color: #3d4f46;
}

.yonout-layout-desc-help {
    margin-top: 0.25rem;
    color: #9aa8a0;
    line-height: 1.4;
}

.yonout-layout-table-visual {
    width: 4.5rem;
}

/* Griglia schema layout (4 righe: 1 / 2 / 3 / 4 blocchi) */

.yonout-layout-preview {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 3.5rem;
}

.yonout-layout-preview-row {
    display: flex;
    gap: 2px;
    height: 0.5rem;
}

.yonout-layout-table-pick {
    vertical-align: middle;
}

.yonout-layout-pick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid #e0e8e4 !important;
    border-radius: 50%;
    background-color: #eef1ef !important;
    color: #3d4f46;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}

.yonout-layout-pick:hover {
    border-color: #c5d0cb !important;
    background-color: #e4ebe6 !important;
}

.yonout-layout-pick.is-selected,
.yonout-layout-pick.is-selected:hover,
.yonout-layout-pick.is-selected:focus {
    background-color: #37b753 !important;
    border-color: #37b753 !important;
}

.yonout-layout-pick-check,
.yonout-layout-pick-dot {
    pointer-events: none;
}

.yonout-layout-pick-check {
    display: none;
    font-size: 1.15rem;
    line-height: 1;
    color: #fff !important;
}

.yonout-layout-pick-dot {
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: #3d4f46;
}

.yonout-layout-pick.is-selected .yonout-layout-pick-check {
    display: inline-block;
}

.yonout-layout-pick.is-selected .yonout-layout-pick-dot {
    display: none;
}

.yonout-layout-table tbody tr {
    cursor: pointer;
}

.yonout-layout-preview-cell {
    flex: 1 1 0;
    min-width: 0;
    background-color: #dce4e0;
    border-radius: 2px;
}

/* Piena colonna — primo blocco riga 1 */
.yonout-layout-preview--col-12 .yonout-layout-preview-row:nth-child(1) .yonout-layout-preview-cell:nth-child(1) {
    background-color: #37b753;
}

/* Mezza colonna — primo blocco riga 2 */
.yonout-layout-preview--col-12-col-md-6 .yonout-layout-preview-row:nth-child(2) .yonout-layout-preview-cell:nth-child(1) {
    background-color: #37b753;
}

/* 2/3 colonna — primi 2 blocchi riga 3 (uniti) */
.yonout-layout-preview--col-12-col-md-8 .yonout-layout-preview-row:nth-child(3) .yonout-layout-preview-cell:nth-child(1),
.yonout-layout-preview--col-12-col-md-8 .yonout-layout-preview-row:nth-child(3) .yonout-layout-preview-cell:nth-child(2) {
    background-color: #37b753;
}

.yonout-layout-preview--col-12-col-md-8 .yonout-layout-preview-row:nth-child(3) .yonout-layout-preview-cell:nth-child(1) {
    border-radius: 2px 0 0 2px;
    margin-right: -2px;
}

.yonout-layout-preview--col-12-col-md-8 .yonout-layout-preview-row:nth-child(3) .yonout-layout-preview-cell:nth-child(2) {
    border-radius: 0 2px 2px 0;
}

/* 3/4 colonna — primi 3 blocchi riga 4 (uniti) */
.yonout-layout-preview--col-12-col-md-9 .yonout-layout-preview-row:nth-child(4) .yonout-layout-preview-cell:nth-child(1),
.yonout-layout-preview--col-12-col-md-9 .yonout-layout-preview-row:nth-child(4) .yonout-layout-preview-cell:nth-child(2),
.yonout-layout-preview--col-12-col-md-9 .yonout-layout-preview-row:nth-child(4) .yonout-layout-preview-cell:nth-child(3) {
    background-color: #37b753;
}

.yonout-layout-preview--col-12-col-md-9 .yonout-layout-preview-row:nth-child(4) .yonout-layout-preview-cell:nth-child(1) {
    border-radius: 2px 0 0 2px;
    margin-right: -2px;
}

.yonout-layout-preview--col-12-col-md-9 .yonout-layout-preview-row:nth-child(4) .yonout-layout-preview-cell:nth-child(2) {
    border-radius: 0;
    margin-right: -2px;
}

.yonout-layout-preview--col-12-col-md-9 .yonout-layout-preview-row:nth-child(4) .yonout-layout-preview-cell:nth-child(3) {
    border-radius: 0 2px 2px 0;
}

/* 1/3 colonna — primo blocco riga 3 */
.yonout-layout-preview--col-12-col-md-4 .yonout-layout-preview-row:nth-child(3) .yonout-layout-preview-cell:nth-child(1) {
    background-color: #37b753;
}

/* 1/4 colonna — primo blocco riga 4 */
.yonout-layout-preview--col-12-col-md-3 .yonout-layout-preview-row:nth-child(4) .yonout-layout-preview-cell:nth-child(1) {
    background-color: #37b753;
}

.yonout-blocco-modal .modal-header {
    border-bottom-color: #e8eeeb;
}

.yonout-blocco-modal .modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    border-top-color: #e8eeeb;
}

@media (max-width: 767.98px) {
    .yonout-col-azioni {
        min-width: 0;
    }

    .yonout-actions {
        justify-content: flex-start !important;
    }
}
