.machuca-guest-instructions-dialog {
    width: min(760px, 100%);
    max-width: 760px;
    max-height: calc(100dvh - 48px);
    padding: 0;
    overflow: auto;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(31, 31, 31, .2);
}

#machuca-guest-instructions-editor-modal .machuca-guest-instructions-dialog {
    width: min(960px, 100%);
    max-width: 960px;
}

.machuca-guest-instructions-header,
.machuca-guest-instructions-view-dialog > h2 {
    margin: 0;
    padding: 24px 64px 18px 24px;
    border-bottom: 1px solid var(--wp--preset--color--border);
}

.machuca-guest-instructions-header h2,
.machuca-guest-instructions-view-dialog > h2 {
    margin: 0;
    font-family: var(--wp--preset--font-family--serif);
    font-size: var(--wp--preset--font-size--lg);
    line-height: 1.2;
}

#machuca-guest-instructions-form {
    font-family: var(--wp--preset--font-family--sans);
}

.machuca-guest-instructions-menu-action {
    white-space: nowrap;
}

.machuca-guest-instructions-section {
    padding: 24px;
    border: 0;
}

.machuca-guest-instructions-section h3,
.machuca-guest-snapshot-section h3 {
    margin: 0 0 12px;
    font-family: var(--wp--preset--font-family--sans);
    font-size: var(--wp--preset--font-size--base);
    font-weight: 700;
}

.machuca-guest-instructions-wifi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.machuca-guest-instructions-wifi-section {
    padding-bottom: 12px;
}

.machuca-guest-instructions-wifi-heading {
    margin-bottom: 16px;
}

.machuca-guest-instructions-wifi-grid p {
    margin: 0;
}

.machuca-guest-instructions-wifi-grid label {
    display: block;
    margin: 0 0 8px;
    color: var(--wp--preset--color--text);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
}

.machuca-guest-instructions-wifi-grid input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 8px;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
    font: inherit;
}

.machuca-guest-instructions-wifi-grid input:focus,
.machuca-guest-instructions-help-toggle:focus-visible,
.machuca-guest-instructions-tabs button:focus-visible,
.machuca-guest-instructions-actions button:focus-visible,
.machuca-guest-instructions-open:focus-visible {
    outline: 2px solid var(--wp--preset--color--accent);
    outline-offset: 2px;
}

.machuca-guest-instructions-editor-section {
    position: relative;
    padding-top: 20px;
}

.machuca-guest-instructions-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 16px;
}

.machuca-guest-instructions-section-heading h3 {
    margin-bottom: 5px;
}

.machuca-guest-instructions-section-heading p {
    margin: 0;
    color: var(--wp--preset--color--text-muted);
    font-size: var(--wp--preset--font-size--sm);
}

.machuca-guest-instructions-editor-frame {
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 10px;
    background: var(--wp--preset--color--surface);
}

.machuca-guest-instructions-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0;
    width: 100%;
    margin: 0;
    border: 0;
    background: var(--wp--preset--color--surface-muted, #f1efe9);
}

.machuca-guest-instructions-tabs button {
    flex: 1 1 50%;
    min-height: 48px;
    margin: 0 0 -1px;
    padding: 12px 16px;
    border: 1px solid transparent !important;
    border-bottom-color: var(--wp--preset--color--border) !important;
    border-radius: 10px 10px 0 0;
    background: color-mix(in srgb, var(--wp--preset--color--surface-muted, #f1efe9) 72%, transparent);
    color: var(--wp--preset--color--text-muted);
    opacity: .72;
    font-family: var(--wp--preset--font-family--sans);
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    cursor: pointer;
}

.machuca-guest-instructions-tabs button:hover,
.machuca-guest-instructions-tabs button:focus {
    border-width: 1px !important;
    border-color: var(--wp--preset--color--border) !important;
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--text);
    opacity: 1;
}

.machuca-guest-instructions-tabs button[aria-selected="true"],
.machuca-guest-instructions-tabs button[aria-selected="true"]:hover,
.machuca-guest-instructions-tabs button[aria-selected="true"]:focus {
    position: relative;
    z-index: 1;
    border-width: 1px !important;
    border-color: var(--wp--preset--color--border) !important;
    border-bottom-color: var(--wp--preset--color--surface) !important;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--primary);
    opacity: 1;
}

.machuca-guest-instructions-help-toggle,
.machuca-guest-instructions-help-toggle:hover,
.machuca-guest-instructions-help-toggle:focus {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 0;
    padding: 0 0 3px;
    border: 0;
    border-bottom: 1px solid currentColor !important;
    border-radius: 0;
    background: transparent;
    color: var(--wp--preset--color--primary) !important;
    font: inherit;
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.machuca-guest-instructions-help-dialog {
    position: absolute;
    z-index: 20;
    top: 82px;
    right: 24px;
    width: min(430px, calc(100% - 48px));
    box-sizing: border-box;
    padding: 22px 52px 22px 22px;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 16px;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
    box-shadow: 0 12px 36px rgba(31, 31, 31, .16);
    font-family: var(--wp--preset--font-family--sans);
    font-size: var(--wp--preset--font-size--sm);
}

.machuca-guest-instructions-help-dialog[hidden],
[data-guest-instructions-panel][hidden],
[data-guest-snapshot-panel][hidden],
[data-guest-instructions-help-content][hidden] {
    display: none !important;
}

.machuca-guest-instructions-help-dialog h3 {
    margin: 0 0 12px;
    font-family: var(--wp--preset--font-family--sans);
    font-size: var(--wp--preset--font-size--base);
    font-weight: 700;
}

.machuca-guest-instructions-help-dialog ul {
    margin: 0;
    padding-left: 20px;
}

.machuca-guest-instructions-help-dialog li {
    line-height: 1.45;
}

.machuca-guest-instructions-help-dialog li + li {
    margin-top: 7px;
}

.machuca-guest-instructions-help-close,
.machuca-guest-instructions-help-close:hover,
.machuca-guest-instructions-help-close:focus {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 999px;
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--text) !important;
    font: inherit;
    font-size: 22px;
    line-height: 1;
}

.machuca-guest-instructions-editor-section .wp-editor-wrap {
    overflow: hidden;
    border: 0 !important;
    border-radius: 0;
}

.machuca-guest-instructions-editor-section .mce-tinymce,
.machuca-guest-instructions-editor-section .mce-panel,
.machuca-guest-instructions-editor-section .wp-editor-container {
    border: 0 !important;
    box-shadow: none;
}

.machuca-guest-instructions-editor-section .mce-btn button:hover,
.machuca-guest-instructions-editor-section .mce-btn button:focus {
    background: var(--wp--preset--color--background) !important;
    color: var(--wp--preset--color--text) !important;
}

.machuca-guest-instructions-editor-section .mce-btn.mce-active button,
.machuca-guest-instructions-editor-section .mce-btn.mce-active button:hover,
.machuca-guest-instructions-editor-section .mce-btn.mce-active button:focus {
    background: var(--wp--preset--color--surface-muted, #f1efe9) !important;
    color: var(--wp--preset--color--text) !important;
}

.machuca-guest-instructions-notice {
    min-height: 1.5em;
    margin: 0;
    padding: 16px 24px 0;
    color: var(--wp--preset--color--text-muted);
    font-size: var(--wp--preset--font-size--sm);
}

.machuca-guest-instructions-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
}

.machuca-guest-instructions-actions button {
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid var(--wp--preset--color--primary);
    border-radius: 999px;
    font: inherit;
    font-size: var(--wp--preset--font-size--sm);
    font-weight: 600;
    cursor: pointer;
}

.machuca-guest-instructions-actions button:focus {
    border-width: 1px !important;
}

.machuca-guest-instructions-cancel {
    border-color: var(--wp--preset--color--border) !important;
    background: var(--wp--preset--color--surface);
    color: var(--wp--preset--color--text);
}

.machuca-guest-instructions-cancel:hover,
.machuca-guest-instructions-cancel:focus {
    border-width: 1px !important;
    border-color: var(--wp--preset--color--border-strong) !important;
    background: var(--wp--preset--color--background);
    color: var(--wp--preset--color--text);
}

.machuca-guest-instructions-save {
    background: var(--wp--preset--color--primary);
    color: var(--wp--preset--color--surface);
}

.machuca-guest-instructions-save:not(:disabled):hover,
.machuca-guest-instructions-save:not(:disabled):focus {
    background: var(--wp--preset--color--primary-soft);
    color: var(--wp--preset--color--surface);
}

.machuca-guest-instructions-save:disabled {
    border-color: var(--wp--preset--color--border);
    background: color-mix(in srgb, var(--wp--preset--color--border) 70%, transparent);
    color: var(--wp--preset--color--text-subtle);
    cursor: not-allowed;
}

.machuca-guest-instructions-modal .machuca-activity-close:hover,
.machuca-guest-instructions-modal .machuca-activity-close:focus {
    border-width: 1px !important;
    border-color: var(--wp--preset--color--border-strong) !important;
    background: var(--wp--preset--color--surface-muted, #f1efe9);
    color: var(--wp--preset--color--text);
}

.acciones-reserva .machuca-guest-instructions-open,
.acciones-reserva .machuca-guest-instructions-open:hover,
.acciones-reserva .machuca-guest-instructions-open:focus {
    display: inline;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--wp--preset--color--primary);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    box-shadow: none;
}

.machuca-guest-instructions-view-content {
    padding: 0 24px 24px;
    font-family: var(--wp--preset--font-family--sans);
}

.machuca-guest-snapshot-section {
    padding: 24px 0;
    border-bottom: 1px solid var(--wp--preset--color--border);
}

.machuca-guest-snapshot-section:last-child {
    border-bottom: 0;
}

.machuca-guest-snapshot-wifi {
    border-bottom: 0;
    padding-bottom: 8px;
}

.machuca-guest-snapshot-wifi dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.machuca-guest-snapshot-wifi dl > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    border-radius: 8px;
    background: var(--wp--preset--color--background);
}

.machuca-guest-snapshot-wifi dt {
    color: var(--wp--preset--color--text-muted);
    font-size: var(--wp--preset--font-size--xs);
}

.machuca-guest-snapshot-wifi dd {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--wp--preset--color--text);
    font-weight: 600;
}

.machuca-guest-snapshot-frame {
    overflow: hidden;
    border: 1px solid var(--wp--preset--color--border);
    border-radius: 10px;
    background: var(--wp--preset--color--surface);
}

.machuca-guest-snapshot-copy {
    padding: 16px;
    color: var(--wp--preset--color--text);
    font-size: var(--wp--preset--font-size--sm);
    line-height: 1.65;
}

.machuca-guest-snapshot-copy > :first-child {
    margin-top: 0;
}

.machuca-guest-snapshot-copy > :last-child {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .machuca-guest-instructions-modal {
        padding: 16px;
        align-items: flex-start;
    }

    .machuca-guest-instructions-dialog {
        max-height: calc(100dvh - 32px);
    }

    .machuca-guest-instructions-wifi-grid {
        grid-template-columns: 1fr;
    }

    .machuca-guest-instructions-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .machuca-guest-instructions-help-dialog {
        top: 118px;
    }

    .machuca-guest-instructions-tabs button {
        padding-inline: 8px;
        font-size: var(--wp--preset--font-size--xs);
    }

}
