/* ========== RSVP Frontend ========== */
*, *::before, *::after { box-sizing: border-box; }

.rsvp-body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.5;
    min-height: 100vh;
}

/* Template 1: Minimal */
.rsvp-tpl-1 { background: #ffffff; }
.rsvp-tpl-1 .rsvp-card {
    max-width: 540px;
    margin: 0 auto;
    padding: 40px 24px;
    background: transparent;
}

/* Template 2: Card */
.rsvp-tpl-2 { background: #f4f5f7; padding: 40px 16px; }
.rsvp-tpl-2 .rsvp-card {
    max-width: 540px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

/* Template 3: Custom Background */
.rsvp-tpl-3 {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 40px 16px;
    min-height: 100vh;
}
.rsvp-tpl-3 .rsvp-card {
    max-width: 540px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}

.rsvp-page { padding: 24px 16px; }
.rsvp-tpl-2 .rsvp-page,
.rsvp-tpl-3 .rsvp-page { padding: 0; }

.rsvp-title {
    font-size: 28px;
    margin: 0 0 16px;
    color: #111;
    text-align: center;
}

.rsvp-meta {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #555;
    text-align: center;
}
.rsvp-meta div + div { margin-top: 4px; }
.rsvp-meta-label { color: #777; }

.rsvp-pax-note {
    margin: 6px 0 0;
    font-size: 12px;
    color: #777;
    line-height: 1.4;
}

.rsvp-footer {
    text-align: center;
    padding: 24px 16px;
    font-size: 13px;
    color: #888;
}
.rsvp-footer a {
    color: #2563eb;
    text-decoration: none;
}
.rsvp-footer a:hover { text-decoration: underline; }
.rsvp-tpl-3 .rsvp-footer { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.5); }
.rsvp-tpl-3 .rsvp-footer a { color: #fff; }

.rsvp-closed {
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #664d03;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.rsvp-field { margin-bottom: 18px; }
.rsvp-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 14px;
    color: #333;
}
.rsvp-req { color: #d63638; }

.rsvp-field input[type="text"],
.rsvp-field input[type="tel"],
.rsvp-field select,
.rsvp-field textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #d0d4d9;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.rsvp-field input:focus,
.rsvp-field select:focus,
.rsvp-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.rsvp-field input.rsvp-error-field,
.rsvp-field select.rsvp-error-field,
.rsvp-field textarea.rsvp-error-field {
    border-color: #d63638;
}

.rsvp-radios {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.rsvp-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #d0d4d9;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
    flex: 1;
    justify-content: center;
    font-weight: 500;
}
.rsvp-radio:hover { border-color: #2563eb; }
.rsvp-radio input { margin: 0; accent-color: #2563eb; }

.rsvp-error {
    background: #fee;
    border: 1px solid #fbb;
    color: #b00;
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 14px;
    font-size: 14px;
}

.rsvp-submit {
    width: 100%;
    padding: 13px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    font-family: inherit;
}
.rsvp-submit:hover { background: #1d4ed8; }
.rsvp-submit:disabled { background: #94a3b8; cursor: not-allowed; }

.rsvp-thanks {
    text-align: center;
    padding: 32px 16px;
}
.rsvp-check {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    font-size: 40px;
    line-height: 72px;
    font-weight: bold;
}
.rsvp-thanks p {
    font-size: 18px;
    color: #333;
    margin: 0;
    white-space: pre-wrap;
}

/* ========== Entries page ========== */
.rsvp-entries-body {
    background: #f4f5f7;
    padding: 24px 16px;
}
.rsvp-entries-page {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.rsvp-entries-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.rsvp-entries-header h1 {
    margin: 0 0 6px;
    font-size: 24px;
}
.rsvp-meta-inline {
    color: #666;
    font-size: 14px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.rsvp-btn-export {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 500;
}
.rsvp-btn-export:hover { background: #333; }

.rsvp-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.rsvp-stat {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}
.rsvp-stat span { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: .5px; }
.rsvp-stat strong { font-size: 24px; margin-top: 4px; }
.rsvp-stat-yes  { background: #ecfdf5; }
.rsvp-stat-yes  strong { color: #065f46; }
.rsvp-stat-no   { background: #fef2f2; }
.rsvp-stat-no   strong { color: #991b1b; }
.rsvp-stat-pax  { background: #eff6ff; }
.rsvp-stat-pax  strong { color: #1e3a8a; }

.rsvp-table-wrap { overflow-x: auto; }
.rsvp-entries-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.rsvp-entries-table th {
    background: #f8f9fa;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e5e7eb;
    line-height: 1.3;
}
.rsvp-entries-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.rsvp-entries-table tr:hover { background: #fafbfc; }

/* Date/Time stacked in single cell */
.rsvp-date { font-weight: 500; color: #1f2937; line-height: 1.4; }
.rsvp-time { color: #6b7280; font-size: 12px; line-height: 1.4; }

/* Search */
.rsvp-table-tools {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.rsvp-search-input {
    flex: 1;
    max-width: 360px;
    padding: 9px 14px;
    font-size: 14px;
    border: 1px solid #d0d4d9;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    -webkit-appearance: none;
    appearance: none;
}
.rsvp-search-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.rsvp-search-count {
    font-size: 12px;
    color: #6b7280;
}

/* Mini toggle (Show Notes checkbox in toolbar) */
.rsvp-toggle-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}
.rsvp-toggle-mini input {
    width: 16px;
    height: 16px;
    accent-color: #2563eb;
    margin: 0;
}

/* Notes column */
.rsvp-col-notes { max-width: 280px; }
.rsvp-entries-table.rsvp-hide-notes .rsvp-col-notes { display: none; }
.rsvp-notes-cell {
    color: #374151;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.rsvp-notes-text { display: block; }
.rsvp-notes-text.rsvp-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.rsvp-notes-empty { color: #9ca3af; }
.rsvp-notes-toggle {
    display: inline-block;
    margin-top: 4px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
}
.rsvp-notes-toggle:hover { text-decoration: underline; }

/* Pagination */
.rsvp-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}
.rsvp-pagination:empty { display: none; }
.rsvp-pg-info { color: #6b7280; }
.rsvp-pg-controls {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.rsvp-pg-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #d0d4d9;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all .12s;
    font-family: inherit;
}
.rsvp-pg-btn:hover:not(:disabled):not(.active) { background: #f3f4f6; border-color: #9ca3af; }
.rsvp-pg-btn:disabled { color: #d1d5db; cursor: not-allowed; }
.rsvp-pg-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.rsvp-pg-dots { padding: 0 4px; color: #9ca3af; }

@media (max-width: 600px) {
    .rsvp-pagination { justify-content: center; }
    .rsvp-pg-info { width: 100%; text-align: center; }
    .rsvp-pg-controls { margin-left: 0; }
}

.rsvp-phone { color: #666; font-size: 13px; }
.rsvp-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.rsvp-badge-yes { background: #d1fae5; color: #065f46; }
.rsvp-badge-no  { background: #fee2e2; color: #991b1b; }

@media (max-width: 600px) {
    .rsvp-summary { grid-template-columns: repeat(2, 1fr); }
    .rsvp-entries-page { padding: 16px; }
    .rsvp-tpl-2 .rsvp-card,
    .rsvp-tpl-3 .rsvp-card { padding: 24px 18px; }
}
