/* CSS Document */

/* ==========================================================================
   Admin: OWDT RSVP – Cards & layout
   ========================================================================== */
.owdt-card {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
  padding: 20px 24px;
  margin-bottom: 24px;
  max-width: 1200px;
}

.owdt-card-title {
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
  font-size: 1.15em;
  font-weight: 600;
  color: #1d2327;
}

.owdt-card-subtitle {
  margin: 20px 0 8px 0;
  font-size: 1em;
  font-weight: 600;
  color: #1d2327;
}

.owdt-card-subtitle:first-of-type {
  margin-top: 0;
}

/* Card header: title + action button (e.g. Guest List + Export CSV) */
.owdt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.owdt-card-header .owdt-card-title {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}

/* Table footer: total + pagination */
.owdt-table-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.owdt-table-range {
  color: #6b7280;
}

.owdt-hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 28px 0;
}

/* ==========================================================================
   Admin: Guests filter form (card + single-line layout)
   ========================================================================== */
.owdt-filter-card {
  padding: 20px 24px 16px;
  margin-bottom: 20px;
}

.owdt-guests-filter-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  padding-bottom: 6px;
}

.owdt-guests-filter-form .owdt-filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.owdt-guests-filter-form .owdt-filter-item label {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.owdt-guests-filter-form .owdt-filter-item select,
.owdt-guests-filter-form .owdt-filter-item input[type="text"] {
  min-width: 0;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fafbfc;
  font-size: 13px;
  line-height: 1.4;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.owdt-guests-filter-form .owdt-filter-item select:focus,
.owdt-guests-filter-form .owdt-filter-item input[type="text"]:focus {
  border-color: #1d6fa5;
  box-shadow: 0 0 0 2px rgba(29, 111, 165, 0.2);
  outline: none;
  background: #fff;
}

.owdt-guests-filter-form .owdt-filter-item select:hover,
.owdt-guests-filter-form .owdt-filter-item input[type="text"]:hover {
  border-color: #9ca3af;
  background: #fff;
}

.owdt-guests-filter-form #event_id {
  width: 200px;
}

.owdt-guests-filter-form #sub_event_ids {
  width: 200px;
  min-height: 72px;
}

.owdt-guests-filter-form #rsvp_status {
  width: 130px;
}

.owdt-guests-filter-form #guest_search {
  width: 180px;
}

.owdt-guests-filter-form #per_page {
  width: 72px;
}

.owdt-guests-filter-form .owdt-filter-actions {
  margin: 15px;
  padding-bottom: 2px;
}

.owdt-guests-filter-form .owdt-filter-actions-label {
  visibility: hidden;
  height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.owdt-guests-filter-form .owdt-btn-filter {
  padding: 6px 16px;
  border-radius: 4px;
  font-weight: 500;
  min-height: 34px;
}

.owdt-filter-hint {
  margin: 12px 0 0 0 !important;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 12px;
}

/* ==========================================================================
   Admin: Form tables & inputs (Add Guest, Import)
   ========================================================================== */
.owdt-form .form-table {
  margin-top: 0;
}

.owdt-form .form-table th {
  padding: 12px 10px 12px 0;
  font-weight: 600;
  color: #1d2327;
}

.owdt-form .form-table td {
  padding: 12px 10px;
}

.owdt-form .form-table input[type="text"],
.owdt-form .form-table input[type="number"] {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fafbfc;
  font-size: 14px;
  max-width: 100%;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.owdt-form .form-table input[type="text"]:focus,
.owdt-form .form-table input[type="number"]:focus {
  border-color: #1d6fa5;
  box-shadow: 0 0 0 2px rgba(29, 111, 165, 0.2);
  outline: none;
  background: #fff;
}

.owdt-form .form-table input[type="text"]:hover,
.owdt-form .form-table input[type="number"]:hover {
  border-color: #9ca3af;
  background: #fff;
}

.owdt-form .form-table input.regular-text {
  min-width: 280px;
}

.owdt-form .form-table input[type="date"],
.owdt-form .form-table input[type="datetime-local"] {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fafbfc;
  font-size: 14px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.owdt-form .form-table input[type="date"]:focus,
.owdt-form .form-table input[type="datetime-local"]:focus {
  border-color: #1d6fa5;
  box-shadow: 0 0 0 2px rgba(29, 111, 165, 0.2);
  outline: none;
  background: #fff;
}

.owdt-form .form-table input[type="date"]:hover,
.owdt-form .form-table input[type="datetime-local"]:hover {
  border-color: #9ca3af;
  background: #fff;
}

.owdt-form .form-table textarea {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fafbfc;
  font-size: 14px;
  font-family: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.owdt-form .form-table textarea:focus {
  border-color: #1d6fa5;
  box-shadow: 0 0 0 2px rgba(29, 111, 165, 0.2);
  outline: none;
  background: #fff;
}

.owdt-form .form-table textarea:hover {
  border-color: #9ca3af;
  background: #fff;
}

.owdt-form .form-table select {
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fafbfc;
  font-size: 14px;
  min-width: 200px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.owdt-form .form-table select:focus {
  border-color: #1d6fa5;
  box-shadow: 0 0 0 2px rgba(29, 111, 165, 0.2);
  outline: none;
  background: #fff;
}

.owdt-form .form-table select:hover {
  border-color: #9ca3af;
  background: #fff;
}

.owdt-form-actions {
  margin: 20px 0 0 0 !important;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.owdt-form-actions .button {
  border-radius: 4px;
  padding: 6px 16px;
  font-weight: 500;
}

/* Sub-events / segments tables (Add Guest form or Edit Event card) */
.owdt-form .widefat.striped,
.owdt-card .widefat.striped {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #d1d5db;
}

.owdt-form .widefat.striped thead th,
.owdt-card .widefat.striped thead th {
  background: #f6f7f7;
  padding: 10px 12px;
  font-weight: 600;
  color: #1d2327;
}

.owdt-form .widefat.striped tbody tr:nth-child(odd),
.owdt-card .widefat.striped tbody tr:nth-child(odd) {
  background: #fff;
}

.owdt-form .widefat.striped tbody tr:nth-child(even),
.owdt-card .widefat.striped tbody tr:nth-child(even) {
  background: #f9f9f9;
}

.owdt-form .widefat.striped tbody td,
.owdt-card .widefat.striped tbody td {
  padding: 10px 12px;
}

.owdt-form h3 {
  margin: 20px 0 8px 0;
  font-size: 1em;
  font-weight: 600;
  color: #1d2327;
}

/* Import section */
.owdt-card code {
  background: #eef1f4;
  color: #2c3e50;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 13px;
}

.owdt-card .description {
  color: #6b7280;
  margin-top: 6px;
}

/* Import Guests (CSV) card – warmer, refined palette */
.owdt-import-card {
  border-color: #d4d6d9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.owdt-import-card .owdt-card-title {
  border-bottom-color: #e4e6e9;
  color: #1a1d21;
}

.owdt-import-card .owdt-import-intro {
  margin: 0 0 16px 0;
  color: #4d5562;
  font-size: 14px;
  line-height: 1.5;
}

.owdt-import-columns {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: #f2f5f7;
  border: 1px solid #dce1e6;
  border-radius: 6px;
}

.owdt-import-columns-label {
  font-size: 12px;
  font-weight: 600;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.owdt-import-columns-list code {
  margin: 0 2px;
  background: #e2e8ee;
  color: #2d3748;
}

.owdt-import-segments {
  margin: 0 0 18px 0 !important;
  font-size: 13px;
  color: #5a6370;
  line-height: 1.5;
}

.owdt-import-segments code {
  margin: 0 2px;
  background: #eef1f4;
  color: #2c3e50;
}

.owdt-import-sample {
  margin: 0 0 20px 0 !important;
}

.owdt-import-sample .owdt-btn-sample {
  border-radius: 4px;
  padding: 6px 14px;
  font-weight: 500;
  border-color: #c5cad0;
  background: #f7f8fa;
  color: #374151;
}

.owdt-import-sample .owdt-btn-sample:hover {
  background: #eef0f3;
  border-color: #a8adb4;
  color: #1f2937;
}

.owdt-import-form .owdt-import-upload {
  padding-top: 16px;
  border-top: 1px solid #e4e6e9;
}

.owdt-import-upload-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a1d21;
  margin-bottom: 8px;
}

.owdt-import-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.owdt-import-file {
  padding: 8px 12px !important;
  border: 1px solid #c5cad0;
  border-radius: 4px;
  font-size: 14px;
  background: #fafbfc;
  max-width: 100%;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.owdt-import-file:hover {
  border-color: #9ca3af;
  background: #fff;
}

.owdt-import-file:focus {
  border-color: #1d6fa5;
  box-shadow: 0 0 0 2px rgba(29, 111, 165, 0.2);
  outline: none;
  background: #fff;
}

.owdt-import-form .button.button-primary {
  border-radius: 4px;
  padding: 6px 16px;
  font-weight: 500;
  background: #1d6fa5;
  border-color: #1a6394;
}

.owdt-import-form .button.button-primary:hover {
  background: #176394;
  border-color: #155a85;
}

.owdt-card-note {
  margin-top: 16px !important;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
}

/* ==========================================================================
   Admin: Meals page
   ========================================================================== */
.owdt-meals-event-form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.owdt-meals-event-label {
  font-size: 13px;
  font-weight: 600;
  color: #1d2327;
}

.owdt-meals-event-form select {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: #fafbfc;
  font-size: 14px;
  min-width: 280px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

.owdt-meals-event-form select:focus {
  border-color: #1d6fa5;
  box-shadow: 0 0 0 2px rgba(29, 111, 165, 0.2);
  outline: none;
  background: #fff;
}

.owdt-meals-event-form select:hover {
  border-color: #9ca3af;
  background: #fff;
}

/* Tables inside cards (Meal List, etc.) */
.owdt-card .widefat.striped.owdt-table,
.owdt-card .widefat.striped {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #d1d5db;
  margin-top: 0;
}

.owdt-card .widefat.striped thead th {
  background: #2d3748;
  padding: 10px 12px;
  font-weight: 600;
  color: #fff;
}

.owdt-card .widefat.striped tbody tr:nth-child(odd) {
  background: #fff;
}

.owdt-card .widefat.striped tbody tr:nth-child(even) {
  background: #f9f9f9;
}

.owdt-card .widefat.striped tbody td {
  padding: 10px 12px;
}

/* ==========================================================================
   Admin: UI/UX – Tables, buttons, empty states, pagination
   ========================================================================== */

/* Table row hover for better scanability */
.owdt-card .widefat.striped tbody tr:hover,
.owdt-form .widefat.striped tbody tr:hover {
  background: #f0f6fc !important;
}

/* Action buttons in tables: gap and hover */
.owdt-card .widefat.striped tbody td .button,
.owdt-form .widefat.striped tbody td .button {
  margin-right: 6px;
  transition: opacity 0.15s ease;
}

.owdt-card .widefat.striped tbody td .button:last-child,
.owdt-form .widefat.striped tbody td .button:last-child {
  margin-right: 0;
}

.owdt-card .widefat.striped tbody td .button:hover,
.owdt-form .widefat.striped tbody td .button:hover {
  opacity: 0.9;
}

/* Empty state: friendly message when no data */
.owdt-empty-state {
  text-align: center;
  padding: 40px 24px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

.owdt-empty-state p {
  margin: 0 0 8px 0;
}

.owdt-empty-state p:last-child {
  margin-bottom: 0;
}

.owdt-empty-state strong {
  color: #1d2327;
}

/* Disabled select: clearer visual state */
.owdt-guests-filter-form #sub_event_ids:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Pagination: larger click targets and spacing */
.owdt-table-footer .tablenav-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.owdt-table-footer .tablenav-pages a,
.owdt-table-footer .tablenav-pages span {
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.owdt-table-footer .tablenav-pages a:hover {
  background: #e5e7eb;
  color: #1d6fa5;
}

.owdt-table-footer .tablenav-pages .current {
  background: #1d6fa5;
  color: #fff;
  border-radius: 4px;
}

/* Focus visible for accessibility (keyboard users) */
.owdt-card button:focus-visible,
.owdt-card a:focus-visible,
.owdt-card input:focus-visible,
.owdt-card select:focus-visible,
.owdt-card textarea:focus-visible {
  outline: 2px solid #1d6fa5;
  outline-offset: 2px;
}

/* Primary button hover */
.owdt-form-actions .button-primary:hover,
.owdt-guests-filter-form .owdt-btn-filter:hover {
  opacity: 0.95;
}

/* Back / secondary links */
.owdt-back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 13px;
  color: #1d6fa5;
  text-decoration: none;
  transition: color 0.15s ease;
}

.owdt-back-link:hover {
  color: #155a85;
}

.owdt-back-link:focus-visible {
  outline: 2px solid #1d6fa5;
  outline-offset: 2px;
}

/* Wrap: consistent top spacing for admin pages */
.owdt-wrap .wrap {
  padding-top: 4px;
}

/* Table column widths (no inline styles) */
.owdt-col-actions {
  width: 170px;
}

.owdt-col-num {
  width: 60px;
}

.owdt-col-active,
.owdt-col-sort {
  width: 90px;
}

/* Narrow table (e.g. segments in Add/Edit Guest) */
.owdt-table-narrow {
  max-width: 900px;
}

/* Form input width utilities */
.owdt-input-seats {
  width: 90px;
  min-width: 90px;
}

.owdt-input-sort {
  width: 120px;
  min-width: 120px;
}

/* Empty state: spacing for button block */
.owdt-empty-state-actions {
  margin-top: 16px;
}

/* Events list: card and table (applied when we add the class) */
.owdt-events-list-card .widefat {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #d1d5db;
}

.owdt-events-list-card .widefat thead th {
  background: #2d3748;
  padding: 12px 14px;
  font-weight: 600;
  color: #fff;
}

.owdt-events-list-card .widefat tbody tr:hover {
  background: #f0f6fc !important;
}

.owdt-events-list-card .widefat tbody td {
  padding: 12px 14px;
}

.owdt-events-list-card .widefat tbody td .button {
  margin-right: 6px;
}

/* ==========================================================================
   Admin: Notices (success & error) – clear, sharp styling, same width as cards
   ========================================================================== */
.notice.notice-success,
.notice.notice-error {
  max-width: 1200px;
}

.notice.notice-success {
  border: 1px solid #0d6832;
  border-left-width: 4px;
  border-left-color: #00a32a;
  background: #edfaef;
  color: #0d6832;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.notice.notice-success p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #0d6832;
}

.notice.notice-error {
  border: 1px solid #8b2635;
  border-left-width: 4px;
  border-left-color: #d63638;
  background: #fcf0f1;
  color: #8b2635;
  border-radius: 6px;
  padding: 12px 16px;
  margin: 16px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.notice.notice-error p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #8b2635;
}

/* Dismiss button alignment */
.notice.is-dismissible {
  padding-right: 38px;
}

.owdt-per-page-form {
	margin-bottom: 5px;
}


.owdt-table-footer-right {
	display: flex;
    gap: 20px;
    flex-direction: row-reverse;
}