/*
 * Long Weekend block styles and layouts. Loaded on the site and in the block editor, so what you build
 * in the editor looks the same on the page.
 *
 * Styles (pick them in the block's Styles panel):
 * - Group → "Side panel": a soft card for a list, facts or links beside your main text.
 * - Details → "Collapsible box": a tidy open/close row, like the Christmas market list.
 * - Columns → "Side panel first on phones": on phones the right-hand column moves above the left.
 */

/* Group → Side panel */
.wp-block-group.is-style-lw-panel { background: var(--lw-card, #fdfbf6); border: 1px solid var(--lw-border, #e2dccd); border-radius: 18px; padding: 1.25rem 1.25rem .75rem; box-shadow: 0 4px 15px rgba(0, 0, 0, .03); }
.wp-block-group.is-style-lw-panel > h2:first-child, .wp-block-group.is-style-lw-panel > h3:first-child { margin-top: 0; padding-bottom: .6rem; border-bottom: 2px solid var(--lw-border, #e2dccd); color: var(--lw-primary, #1d5646); font-size: 1.35rem; }
.wp-block-group.is-style-lw-panel > p { font-size: .95rem; }

/* Details → Collapsible box (beats the theme's FAQ card style for details in articles) */
.lw-entry .wp-block-details.is-style-lw-collapsible, .wp-block-details.is-style-lw-collapsible { background: none; box-shadow: none; border: 0; border-bottom: 1px solid var(--lw-border, #e2dccd); border-radius: 0; padding: .75rem 0; margin: 0; }
.lw-entry .wp-block-details.is-style-lw-collapsible:last-child { border-bottom: 0; }
.lw-entry .wp-block-details.is-style-lw-collapsible > summary { align-items: center; }
.lw-entry .wp-block-details.is-style-lw-collapsible > summary::after, .wp-block-details.is-style-lw-collapsible > summary::after { content: ""; color: inherit; font-size: 0; line-height: 0; }
.lw-entry .wp-block-details.is-style-lw-collapsible[open] > summary::after { transform: rotate(-135deg); }
.lw-entry .wp-block-details.is-style-lw-collapsible p { color: inherit; }
.wp-block-details.is-style-lw-collapsible { border: 0; border-bottom: 1px solid var(--lw-border, #e2dccd); border-radius: 0; background: none; padding: .75rem 0; margin: 0; }
.wp-block-details.is-style-lw-collapsible:last-child { border-bottom: 0; }
.wp-block-details.is-style-lw-collapsible > summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.wp-block-details.is-style-lw-collapsible > summary::-webkit-details-marker { display: none; }
.wp-block-details.is-style-lw-collapsible > summary::after { content: ""; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); flex: none; margin-right: .2rem; transition: transform .2s ease; }
.wp-block-details.is-style-lw-collapsible[open] > summary::after { transform: rotate(-135deg); }
.wp-block-details.is-style-lw-collapsible > summary:focus-visible { outline: 2px solid var(--lw-primary, #1d5646); outline-offset: 3px; border-radius: 4px; }
.wp-block-details.is-style-lw-collapsible p { font-size: .95rem; margin: .6rem 0 0; }

/* Columns → Side panel first on phones */
@media (max-width: 781px) {
	.wp-block-columns.is-style-lw-panel-first > .wp-block-column:last-child { order: -1; }
}

/* Two-column layouts need room: on the "Full width (no sidebar)" template, wide blocks break out of the text column. */
@media (min-width: 900px) {
	.lw-article-body.is-full .lw-entry > .alignwide { width: min(1180px, calc(100vw - 4rem)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
}
.wp-block-columns.alignwide { gap: 2.5rem; }

@media (prefers-reduced-motion: reduce) { .wp-block-details.is-style-lw-collapsible > summary::after { transition: none; } }

/* Group → "Booking panel": the same card as the theme's "Book a room early" panels, for hotel buttons, links and notes. */
.wp-block-group.is-style-lw-booking { background: var(--lw-card, #fdfbf6); border: 1px solid var(--lw-border, #e2dccd); border-radius: calc(var(--lw-radius, 18px) + 8px); padding: 1.5rem; margin-top: 2rem; }
.wp-block-group.is-style-lw-booking > * { margin-top: 0; margin-bottom: 0; }
.wp-block-group.is-style-lw-booking > * + * { margin-top: 1rem; }
.wp-block-group.is-style-lw-booking > h2:first-child, .wp-block-group.is-style-lw-booking > h3:first-child { font-size: 1.5rem; }
.wp-block-group.is-style-lw-booking > :is(h2, h3):first-child + p { margin-top: .5rem; color: var(--lw-muted-fg, #5e6f68); font-size: .95rem; }
.wp-block-group.is-style-lw-booking .lwt-stay-btns { margin-top: 1rem; }
.wp-block-group.is-style-lw-booking .lwt-links { margin-top: .75rem; }
/* Panels inside a column sit snugly under whatever is above them. */
.wp-block-column > .lwt-panel:first-child, .wp-block-column > .is-style-lw-booking:first-child { margin-top: 0 !important; }
.wp-block-column > .wp-block-group.is-style-lw-panel + .lwt-panel, .wp-block-column > .wp-block-group.is-style-lw-panel + .is-style-lw-booking { margin-top: 1.5rem !important; }

/* FAQ boxes (Details blocks) look the same in the widget sidebar as in the page. */
.lw-sidebar .wp-block-details { background: var(--lw-card, #fdfbf6); border: 1px solid var(--lw-border, #e2dccd); border-radius: calc(var(--lw-radius, 18px) + 8px); padding: 1rem 1.15rem; margin: 0 0 .6rem; }
.lw-sidebar .wp-block-details > summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: .75rem; }
.lw-sidebar .wp-block-details > summary::-webkit-details-marker { display: none; }
.lw-sidebar .wp-block-details > summary::after { content: "+"; color: var(--lw-primary, #1d5646); font-weight: 600; transition: transform .2s ease; }
.lw-sidebar .wp-block-details[open] > summary::after { transform: rotate(45deg); }
.lw-sidebar .wp-block-details p { margin: .6rem 0 0; font-size: .95rem; color: var(--lw-muted-fg, #5e6f68); }

/* Tables inside a side panel (e.g. opening hours): compact, and never split a word across lines. */
.wp-block-group.is-style-lw-panel .wp-block-table { margin: .75rem 0 1rem; font-size: .9rem; }
.wp-block-group.is-style-lw-panel .wp-block-table th,
.wp-block-group.is-style-lw-panel .wp-block-table td { padding: .5rem .65rem; word-break: normal; overflow-wrap: normal; hyphens: manual; text-align: left; vertical-align: top; }
.wp-block-group.is-style-lw-panel .wp-block-table td:first-child { font-weight: 600; width: 38%; }
