/**
 * Anabaptist Trail Core — itinerary view styles.
 * Companion to [at_itinerary] shortcode.
 */

.at-itinerary {
    max-width: 800px;
    margin: 32px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2f3e46;
}

.at-itinerary-header {
    margin-bottom: 24px;
    text-align: center;
}

.at-itinerary-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8em;
    color: #2f3e46;
    margin: 0 0 8px;
    letter-spacing: 0.02em;
}

.at-itinerary-summary {
    color: #776b6e;
    margin: 0;
    font-size: 0.95em;
}

/* ─── EMPTY STATE ────────────────────────────────────────────────────────── */

.at-itinerary-empty {
    background: #f6f4ef;
    border: 1px dashed #d8cec2;
    border-radius: 4px;
    padding: 40px 24px;
    text-align: center;
    color: #555;
}
.at-itinerary-empty p { margin: 0 0 8px; }
.at-itinerary-empty p:last-child { margin-bottom: 0; }

/* ─── LIST ───────────────────────────────────────────────────────────────── */

.at-itinerary-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.at-itinerary-item {
    display: grid;
    grid-template-columns: auto 96px 1fr auto;
    gap: 16px;
    align-items: center;
    background: #fff;
    border: 1px solid #d8cec2;
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(47,62,70,0.04);
    transition: box-shadow 0.2s ease;
}

.at-itinerary-item:hover { box-shadow: 0 4px 14px rgba(47,62,70,0.08); }

.at-itinerary-num {
    font-family: Georgia, serif;
    font-size: 1.5em;
    font-weight: 700;
    color: #607244;
    min-width: 32px;
    text-align: center;
}

.at-itinerary-thumb {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 3px;
    background: #d8cec2;
    display: block;
}
.at-itinerary-thumb-placeholder {
    background: #d8cec2;
    background-image: linear-gradient(135deg, #d8cec2 25%, #cdc4b6 25%, #cdc4b6 50%, #d8cec2 50%, #d8cec2 75%, #cdc4b6 75%, #cdc4b6);
    background-size: 12px 12px;
}

.at-itinerary-info { min-width: 0; }

.at-itinerary-name {
    font-size: 1.08em;
    font-weight: 600;
    color: #2f3e46;
    margin: 0 0 4px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

.at-itinerary-meta {
    color: #776b6e;
    font-size: 0.9em;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── ACTIONS PER ITEM ───────────────────────────────────────────────────── */

.at-itinerary-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
}

.at-itin-btn {
    background: #f6f4ef;
    border: 1px solid #d8cec2;
    color: #3a3f45 !important;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.82em;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    line-height: 1.3;
    font-family: inherit;
    transition: background 0.15s ease;
    min-width: 70px;
}
.at-itin-btn:hover:not(:disabled) {
    background: #ece4d6;
    color: #3a3f45 !important;
    text-decoration: none;
}
.at-itin-btn:disabled { opacity: 0.4; cursor: default; }

.at-itin-btn-arrows {
    display: flex;
    gap: 2px;
}
.at-itin-btn-arrows .at-itin-btn { min-width: 32px; padding: 4px 6px; }

.at-itin-remove {
    color: #a94442 !important;
    border-color: #e6c5c4;
}
.at-itin-remove:hover:not(:disabled) {
    background: #fae8e8;
    color: #8c2624 !important;
}

/* ─── FOOTER ACTIONS ─────────────────────────────────────────────────────── */

.at-itinerary-footer {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid #ece4d6;
}

.at-itin-action {
    background: #f6f4ef;
    border: 1px solid #d8cec2;
    color: #3a3f45;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    font-family: inherit;
    transition: background 0.15s ease;
}
.at-itin-action:hover { background: #ece4d6; }

.at-itin-action-primary {
    background: #607244;
    color: #fff;
    border-color: #4f5e38;
}
.at-itin-action-primary:hover {
    background: #4f5e38;
    color: #fff;
}

.at-itin-action-danger { color: #8c2624; border-color: #e6c5c4; }
.at-itin-action-danger:hover { background: #fae8e8; }

/* ─── MOBILE ─────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .at-itinerary-item {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        gap: 8px 12px;
    }
    .at-itinerary-thumb { display: none; }
    .at-itinerary-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
}

/* ─── PRINT ──────────────────────────────────────────────────────────────── */

@media print {
    body * { visibility: hidden; }
    .at-itinerary, .at-itinerary * { visibility: visible; }
    .at-itinerary {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 24px;
    }
    .at-itinerary-actions,
    .at-itinerary-footer { display: none !important; }
    .at-itinerary-item {
        page-break-inside: avoid;
        border-color: #999;
        box-shadow: none;
    }
    .at-itin-btn { display: none; }
}
