/* ACC Organizer Tools: dashboard, Manage sign-ups, cancel screen, banners. */

.acc-ot h2 { margin-top: 1.5em; }
.acc-ot-table { width: 100%; border-collapse: collapse; margin: 0.5em 0 1.5em; }
.acc-ot-table th,
.acc-ot-table td { border-bottom: 1px solid #ddd; padding: 6px 8px; text-align: left; vertical-align: top; }
.acc-ot-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.acc-ot-email-participants { margin: 1em 0; }
.acc-ot-help { font-size: 13px; color: #555; margin: 0.4em 0 0; }
.acc-ot-copy-status { align-self: center; font-size: 13px; }
.acc-ot-email-list { width: 100%; max-width: 40em; min-height: 4em; margin-top: 0.5em; font-size: 13px; }
.acc-ot-actions a.button,
.acc-ot-actions button.button,
.acc-ot-post-trip a.button,
.acc-ot-inline-form button {
    display: inline-block; box-sizing: border-box; font-size: 13px; line-height: 1.5; padding: 2px 8px;
    border: 1px solid #8c8f94; border-radius: 3px; background: #f0f0f1; color: #1d2327;
    text-decoration: none; cursor: pointer; font-family: inherit;
}
.acc-ot-primary { font-size: 16px !important; padding: 8px 16px !important; }
.acc-ot-inline-form { display: inline; margin: 0; }
.acc-ot-tag { display: inline-block; font-size: 12px; padding: 0 6px; border-radius: 3px; background: #eee; margin-left: 4px; }
.acc-ot-tag-cancelled { background: #b32d2e; color: #fff; }
.acc-ot-danger { background: #b32d2e !important; color: #fff !important; border-color: #b32d2e !important; }
.acc-ot-notice { padding: 8px 12px; margin: 0 0 1em; border-left: 4px solid #2e7d32; background: #f1f8f1; }
.acc-ot-notice-error { border-left-color: #b32d2e; background: #fbeaea; }
.acc-ot-notice-info { border-left-color: #1565c0; background: #eef4fb; }
.acc-ot-cancelled-banner { padding: 12px 16px; margin: 0 0 1em; background: #b32d2e; color: #fff; }
.acc-ot-cancelled-banner strong { color: #fff; }
.acc-ot-search input[type="search"] { min-width: 16em; }
.acc-ot textarea { width: 100%; max-width: 40em; min-height: 6em; }

@media (max-width: 700px) {
    .acc-ot-table thead { display: none; }
    .acc-ot-table tr { display: block; border-bottom: 2px solid #ccc; padding: 6px 0; }
    .acc-ot-table td { display: block; border: 0; padding: 2px 4px; }
    .acc-ot-table td[data-label]::before { content: attr(data-label) ": "; font-weight: 600; }
    .acc-ot-table td:empty { display: none; }
}

/* Trip sheet (bare page). */
.acc-ot-sheet { font: 14px/1.4 -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #000; background: #fff; margin: 16px; }
.acc-ot-sheet h1 { font-size: 20px; margin: 0 0 4px; }
.acc-ot-sheet table { width: 100%; border-collapse: collapse; }
.acc-ot-sheet th,
.acc-ot-sheet td { border: 1px solid #999; padding: 4px 6px; text-align: left; vertical-align: top; }
.acc-ot-sheet thead { display: table-header-group; }
.acc-ot-sheet tr { page-break-inside: avoid; }
.acc-ot-sheet-agreed { text-align: center; }
.acc-ot-sheet-footer { font-size: 12px; margin-top: 12px; }

@media print {
    @page { size: portrait; margin: 12mm; }
    .acc-ot-sheet { margin: 0; }
    .acc-ot-sheet-print { display: none; }
}

/* Sessions section (trip form and wp-admin) */
.acc-ot-sessions { border: 1px solid #ddd; padding: 8px 12px; margin: 1em 0; container: acc-ot-sessions / inline-size; }
.acc-ot-sessions legend { font-weight: 700; padding: 0 4px; }
.eo-fes-form-element[hidden] { display: none !important; }
.acc-ot-sessions-dates { margin: 35px 0 0; }
.acc-ot-sessions-table { border-collapse: collapse; width: 100%; }
.acc-ot-sessions-table th { text-align: left; font-weight: 600; padding: 4px; }
/* Prefixed to beat Divi's .entry-content table cell padding. */
.acc-ot-sessions .acc-ot-sessions-table td { padding: 4px; vertical-align: middle; }
.acc-ot-sessions-table input[type=text] { width: 100%; }
/* Less than the theme's roomy input padding, which left no room for the label column. */
.acc-ot-sessions-table input { max-width: 100%; box-sizing: border-box; padding: 6px 8px; }
/* Rows as a table when the section is wide enough, stacked otherwise (phones, the
   edit page's narrower column, the wp-admin box). */
@container acc-ot-sessions (min-width: 721px) {
    .acc-ot-sessions-table input[type=text] { min-width: 12em; }
}
@container acc-ot-sessions (max-width: 720px) {
    .acc-ot-sessions-table thead { display: none; }
    .acc-ot-sessions-table, .acc-ot-sessions-table tbody { display: block; }
    .acc-ot-sessions .acc-ot-sessions-table td { display: block; min-width: 0; border: 0; }
    .acc-ot-sessions-table input { width: 100%; }
    .acc-ot-sessions-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; border-bottom: 1px solid #ddd; padding: 6px 0; }
    .acc-ot-sessions-table td:first-child, .acc-ot-sessions-table td:nth-child(4) { grid-column: 1 / -1; }
}

/* Course schedule (trip page and trip sheet) */
.acc-ot-schedule { margin: 1em 0; }
.acc-ot-schedule h3 { margin: 0 0 0.3em; font-size: 1.1em; }
.acc-ot-schedule ul { list-style: none; margin: 0; padding: 0; }
.acc-ot-schedule li { padding: 2px 0; }
.acc-ot-schedule p { margin: 0.4em 0 0; font-style: italic; }
@media print { .acc-ot-schedule { break-inside: avoid; } }
