/* ======================================================
   Slubix – Wedding RSVP Styles
   ====================================================== */

:root {
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Montserrat', system-ui, sans-serif;
    --clr-bg: #faf9f7;
    --clr-surface: #ffffff;
    --clr-text: #2c3e50;
    --clr-text-muted: #7f8c8d;
    --clr-accent: #8e7c5a;
    --clr-accent-light: #c4b99a;
    --clr-border: #e8e4de;
    --clr-success: #27ae60;
    --clr-error: #c0392b;
    --clr-warn: #f39c12;
    --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    font-weight: 300;
    color: var(--clr-text);
    background: var(--clr-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ---- Guest page ---- */

.hero {
    text-align: center;
    padding: 3rem 1rem 2rem;
}

.hero-sub {
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.7rem;
    color: var(--clr-text-muted);
    margin-bottom: 0.5rem;
}

.hero-names {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.2rem, 8vw, 3.5rem);
    color: var(--clr-accent);
    line-height: 1.1;
}

.hero-date {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--clr-text-muted);
    margin-top: 0.75rem;
}

.section {
    margin-bottom: 2.5rem;
}

.section h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--clr-accent);
    text-align: center;
    margin-bottom: 1.25rem;
}

.greeting {
    text-align: center;
    font-size: 0.95rem;
}

.greeting p { margin-bottom: 0.5rem; }

/* Info cards */

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 480px) {
    .info-grid { grid-template-columns: 1fr; }
}

.info-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
}

.info-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.info-icon {
    font-size: 1.6rem;
    margin-bottom: 0.4rem;
}

.info-card p { margin-bottom: 0.25rem; }

/* Timeline */

.timeline-list {
    max-width: 360px;
    margin: 0 auto;
}

.tl-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--clr-border);
    font-size: 0.88rem;
}

.tl-item:last-child { border-bottom: none; }

.tl-time {
    font-weight: 500;
    min-width: 3.5rem;
    color: var(--clr-accent);
}

.timeline-note {
    text-align: center;
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    margin-top: 1rem;
    font-style: italic;
}

/* ---- Boarding pass cards ---- */

.boarding-pass {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.bp-header {
    background: var(--clr-accent);
    color: #fff;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bp-name {
    font-weight: 500;
    font-size: 1rem;
}

.bp-seq {
    font-size: 0.75rem;
    opacity: 0.8;
    letter-spacing: 0.05em;
}

.bp-body {
    padding: 1rem;
}

.bp-section {
    margin-bottom: 1rem;
}

.bp-section:last-child {
    margin-bottom: 0;
}

.bp-label {
    font-weight: 500;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--clr-accent);
    margin-bottom: 0.75rem;
}

.tooltip {
    display: inline-block;
    cursor: help;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    margin-left: 0.3rem;
    vertical-align: middle;
}

.bp-hint a {
    color: var(--clr-accent);
    text-decoration: underline;
}

.bp-hint {
    font-size: 0.75rem;
    color: var(--clr-text-muted);
    margin-bottom: 0.4rem;
    font-style: italic;
}

.bp-details {
    display: none;
    border-top: 1px dashed var(--clr-border);
    padding-top: 1rem;
    margin-top: 0.75rem;
}

.bp-tear {
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        var(--clr-bg) 0px,
        var(--clr-bg) 6px,
        transparent 6px,
        transparent 12px
    );
}

/* Shared section (parking, notes, submit) */

.shared-section {
    margin-top: 0.5rem;
}

/* ---- Form elements ---- */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 400;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--clr-text);
}

input[type="text"],
textarea,
select {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.88rem;
    background: var(--clr-surface);
    transition: border-color 0.2s;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--clr-accent);
}

/* Custom radios */

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 300;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid var(--clr-border);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: var(--clr-accent);
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--clr-accent);
}

/* Custom checkboxes */

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 300;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    border: 2px solid var(--clr-border);
    border-radius: 3px;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
    margin-right: 0.4rem;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    border-color: var(--clr-accent);
    background: var(--clr-accent);
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Button */

.btn {
    display: inline-block;
    padding: 0.75rem 2.5rem;
    background: var(--clr-accent);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    text-align: center;
}

.btn:hover { background: #7a6b4e; }

.btn-secondary {
    background: transparent;
    color: var(--clr-accent);
    border: 1px solid var(--clr-accent);
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    width: auto;
}

.btn-secondary:hover {
    background: var(--clr-accent);
    color: #fff;
}

/* Alert */

.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    text-align: center;
}

.alert-success {
    background: #e8f8f0;
    color: var(--clr-success);
    border: 1px solid #b8e6cc;
}

/* Footer */

.footer {
    text-align: center;
    padding: 2rem 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--clr-text-muted);
}

/* ---- Admin page ---- */

.admin-page {
    background: #f0f2f5;
}

.admin-container {
    max-width: 1100px;
}

.admin-container h1 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.admin-container h2 {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem;
}

/* Stats */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.stat-card {
    background: var(--clr-surface);
    border-radius: var(--radius);
    padding: 0.85rem;
    text-align: center;
    border-left: 3px solid var(--clr-border);
}

.stat-ok { border-left-color: var(--clr-success); }
.stat-people { border-left-color: var(--clr-accent); }
.stat-no { border-left-color: var(--clr-error); }
.stat-wait { border-left-color: var(--clr-warn); }

.stat-value {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1;
}

.stat-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--clr-text-muted);
    margin-top: 0.25rem;
}

/* Table */

.table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    background: var(--clr-surface);
    border-radius: var(--radius);
    overflow: hidden;
}

thead { background: var(--clr-text); color: #fff; }

th, td {
    padding: 0.5rem 0.6rem;
    text-align: left;
    white-space: nowrap;
}

th {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
}

tbody tr { border-bottom: 1px solid var(--clr-border); }
tbody tr:last-child { border-bottom: none; }

.row-ok { background: #f0faf4; }
.row-no { background: #fdf0ee; }
.row-wait { background: var(--clr-surface); }

/* Badges */

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-ok { background: #d4efdf; color: #1e8449; }
.badge-no { background: #fadbd8; color: #922b21; }
.badge-wait { background: #fdebd0; color: #b7950b; }

.admin-actions {
    text-align: right;
}

/* Map link */

.map-link {
    text-align: center;
    margin-top: 1rem;
}

.map-link a {
    display: inline-block;
    color: var(--clr-accent);
    font-size: 0.88rem;
    font-weight: 400;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--clr-accent);
    border-radius: var(--radius);
    transition: background 0.2s, color 0.2s;
}

.map-link a:hover {
    background: var(--clr-accent);
    color: #fff;
}

/* Shared cards (nocleg, poprawiny, parking per zaproszenie) */

.shared-card {
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.afterparty-until-wrap {
    display: none;
    margin-top: 0.75rem;
}

/* Admin filters */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.filter-input,
.filter-select {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.78rem;
    background: var(--clr-surface);
    flex: 1;
    min-width: 130px;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--clr-accent);
}

/* Sortable headers */

th.sortable {
    user-select: none;
    position: relative;
    padding-right: 1.2rem;
}

th.sortable::after {
    content: '\2195';
    position: absolute;
    right: 0.3rem;
    opacity: 0.4;
    font-size: 0.7rem;
}

th.sort-asc::after {
    content: '\2191';
    opacity: 1;
}

th.sort-desc::after {
    content: '\2193';
    opacity: 1;
}
