/* ── Itinerary header button (on entry page) ───────────────────────────────── */
.itin-header-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    padding: 0.2rem 0.65rem;
    border: 1.5px solid var(--gold);
    border-radius: 3px;
    opacity: 0.85;
    transition: opacity 0.15s, background 0.15s;
}
.itin-header-btn:hover { opacity: 1; background: rgba(201,168,76,0.12); color: var(--gold); }
.itin-header-btn--new {
    color: rgba(247,243,236,0.5);
    border-color: rgba(247,243,236,0.2);
}
.itin-header-btn--new:hover { color: var(--gold); border-color: var(--gold); background: rgba(201,168,76,0.1); }

/* ── Itinerary table page ──────────────────────────────────────────────────── */
.itin-table-wrap {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 3rem;
}

.itin-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.itin-meta-input {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--ink);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 3px;
    padding: 0.35rem 0.6rem;
    transition: border-color 0.15s;
}
.itin-meta-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.12);
}

/* Horizontally scrollable */
.itin-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: var(--shadow);
}

.itin-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    background: var(--white);
    min-width: 860px;
}

/* Column widths */
.itin-table .col-day        { width: 32px;  text-align: center; }
.itin-table .col-date       { width: 40px;  white-space: nowrap; }
.itin-table .col-title      { width: 100px; }
.itin-table .col-accom      { width: 120px; }
.itin-table .col-transport  { width: 120px; }
.itin-table .col-activities { width: 400px; }

/* Sticky header */
.itin-table thead tr {
    background: var(--ink);
    position: sticky;
   
    z-index: 10;
}
.itin-table thead th {
    color: rgba(247,243,236,0.75);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.55rem 0.6rem;
    text-align: left;
    border-right: 1px solid rgba(255,255,255,0.06);
    white-space: nowrap;
}
.itin-table thead th.col-day { text-align: center; }
.itin-table thead th:last-child { border-right: none; }

/* Body rows */
.itin-table tbody tr {
    border-bottom: 1px solid var(--cream);
}
.itin-table tbody tr:last-child { border-bottom: none; }
.itin-table tbody tr:hover { background: #FDFAF5; }
.itin-table tbody tr:hover .itin-cell { background: #FDFAF5; }

.itin-table tbody td {
    padding: 0.3rem 0.4rem;
    vertical-align: top;
    border-right: 1px solid var(--cream);
}
.itin-table tbody td:last-child { border-right: none; }
.itin-table tbody td.col-day,
.itin-table tbody td.col-date { vertical-align: middle; }

/* Weekend rows */
.itin-row--weekend { background: #FDFAF4; }
.itin-row--weekend .itin-cell { background: #FDFAF4; }
.itin-row--weekend:hover { background: #FAF6EC; }
.itin-row--weekend:hover .itin-cell { background: #FAF6EC; }

/* Day number bubble */
.itin-daynum {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 0.82rem;
    font-weight: 700;
}

/* Date cell */
.itin-dow {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}
.itin-date {
    display: block;
    font-weight: 600;
    color: var(--ink);
    font-size: 0.85rem;
}
.itin-row--weekend .itin-date { color: var(--gold-dim); }

/* Editable cell textarea */
.itin-cell {
    width: 100%;
    min-height: 32px;
    padding: 0.3rem 0.4rem;
    font-family: var(--font-ui);
    font-size: 0.83rem;
    line-height: 1.45;
    color: var(--ink);
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: 3px;
    resize: none;
    overflow: hidden;
    transition: border-color 0.12s, background 0.12s;
    display: block;
    box-sizing: border-box;
}
.itin-cell:hover {
    border-color: var(--border);
    background: var(--white);
}
.itin-cell:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}
.itin-cell::placeholder { color: #D0C8C0; }

/* Add-day footer row */
.itin-add-row td {
    padding: 0.5rem 0.75rem;
    border-top: 2px dashed var(--border);
    background: var(--parchment);
}
.itin-add-btn {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold-dim);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.itin-add-btn:hover { color: var(--ink); }
.itin-add-date {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.8rem;
}

@media (max-width: 640px) {
    .itin-table-wrap { padding: 0.75rem 0.5rem 2rem; }
    .itin-table-toolbar { gap: 0.5rem; }
}
