/* Patula Form — base presentation. Kept at specificity (0,3,0) so it beats typical
   theme heading rules such as ".page-template-X .content h2". */

/* ---- Title ------------------------------------------------------------- */
.ccm-block-patula-application-form.pt-application-form .pt-form-title {
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 0 0 .75rem;
}

/* ---- Dropdown-pane mode ------------------------------------------------ */
/* No position:relative here on purpose: the pane is sized and placed against the
   viewport by view.js, so it may be wider than the column the block sits in. */

/* Low-specificity rules so a theme class passed in "Extra CSS class" wins. */
.pt-pane-trigger {
    cursor: pointer;
}
.pt-pane-trigger p {
    margin: 0;
}

.pt-pane {
    display: none;
    z-index: 20;
    box-sizing: border-box;
    padding: 1.5rem 1.5rem 1rem;
    /* The pane is often placed inside a coloured, centred banner (white text, text-align:center).
       Everything in it inherits from here, so give it its own readable defaults. */
    color: #0a0a0a;
    text-align: left;
    background: #fff;
    border: 1px solid #cacaca;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}
.pt-pane.is-open {
    display: block;
}
.pt-pane .pt-form-title {
    padding-right: 2.5rem; /* keep the heading clear of the close button */
}

/* Foundation writes inline top/left and recalculates on resize, so full width
   has to be forced with !important. view.js sets --pt-pane-left / --pt-pane-width
   so the pane spans the viewport whatever column it sits in. */
.pt-pane.pt-pane-full,
.pt-pane.pt-pane-grid {
    left: var(--pt-pane-left, 0) !important;
    right: auto !important;
    width: var(--pt-pane-width, 100%) !important;
    max-width: none !important;
}
.pt-pane.pt-pane-full {
    /* Content inset: set by view.js to match the page's .grid-container;
       falls back to a viewport-relative margin when there is none. */
    padding-left: var(--pt-pane-pad-left, max(1.5rem, 5vw));
    padding-right: var(--pt-pane-pad-right, max(1.5rem, 5vw));
}
.pt-pane.pt-pane-full .pt-pane-close {
    right: var(--pt-pane-pad-right, 1rem);
}

.pt-pane-close {
    position: absolute;
    top: .5rem;
    right: 1rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 2em;
    line-height: 1;
    color: #8a8a8a;
    cursor: pointer;
}
.pt-pane-close:hover,
.pt-pane-close:focus {
    color: #0a0a0a;
}

/* Used when the page is in edit mode, and by the no-Foundation fallback. */
.pt-pane.pt-pane-static,
.pt-pane.pt-pane-fallback {
    position: static;
    left: auto !important;
    width: auto !important;
    max-width: 100% !important;
    margin-top: .75rem;
}
.pt-pane.pt-pane-static {
    display: block;
}

/* ---- Phones: the pane becomes a scrollable full-screen sheet ---------------
   A tall form in an absolutely positioned pane is hard to reach once the on-screen
   keyboard covers half the screen. As a fixed sheet that is exactly as tall as the
   *visible* area (view.js keeps --pt-vvh / --pt-vvtop in sync with the keyboard) it
   scrolls on its own and the page behind it is locked. */
html.pt-pane-lock {
    overflow: hidden;
}
.pt-pane.pt-pane-sheet.pt-pane-sheet {
    position: fixed !important;
    top: var(--pt-vvtop, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: var(--pt-vvh, 100dvh);
    margin: 0 !important;
    padding: 1rem 1rem calc(3rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border: 0;
    box-shadow: none;
    z-index: 10000;
}
.pt-pane.pt-pane-sheet .pt-pane-close {
    right: 1rem;
}

/* ---- Review step -------------------------------------------------------- */
.pt-form [hidden] {
    display: none !important;
}
.pt-review:focus {
    outline: none;
}
.pt-review .pt-review-title {
    margin: 0 0 .5rem;
}
.pt-review .pt-review-intro {
    margin-bottom: 1rem;
}
.pt-review-list {
    margin: 0 0 1.5rem;
}
.pt-review-list dt {
    margin-top: .9rem;
    font-weight: 600;
}
.pt-review-list dd {
    margin: .15rem 0 0;
    white-space: pre-wrap;      /* keeps line breaks from text areas and file lists */
    overflow-wrap: anywhere;
}
.pt-review-list dd.pt-review-empty {
    color: #8a8a8a;
    font-style: italic;
}
.pt-actions .button {
    margin-right: .5rem;
}
