/* --- General & Desktop Styles --- */
.itinerary-container { color: #333; }
.itinerary-container { max-width: 900px; margin: auto; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border: 1px solid #e5e7eb; overflow: hidden;}
.itinerary-table { width: 100%; border-collapse: collapse; display: table;}
.itinerary-list-mobile { display: none; }
.itinerary-table th, .itinerary-table td { padding: 16px; text-align: left; font-size: 14px; }
.itinerary-table th { background-color: #f9fafb; color: #6b7280; font-weight: bold; text-transform: uppercase; letter-spacing: 0.5px; font-size: 12px; }
.itinerary-table tbody tr { border-bottom: 1px solid #e5e7eb; transition: background-color 0.2s ease; }
.itinerary-table tbody tr.clickable { cursor: pointer; }
.itinerary-table tbody tr.clickable:hover { background-color: #f5f5f5; }
.itinerary-table tbody tr:last-child { border-bottom: none; }
.itinerary-table .port-name { color: #111827; font-weight: 500; }
.itinerary-table .anchor-icon { margin-right: 8px; font-size: 12px; }
.port-modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); align-items: center; justify-content: center; }
.port-modal.is-visible { display: flex; }
.port-modal__content { background-color: #fefefe; width: 90%; max-width: 850px; position: relative; animation: fadeIn 0.3s; display: flex; box-shadow: 0 8px 30px rgba(0,0,0,0.15); border-radius: 8px; overflow: hidden;}
@keyframes fadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
.port-modal__close { color: #aaa; position: absolute; top: 15px; right: 25px; font-size: 28px; font-weight: bold; cursor: pointer; z-index: 10; }
.port-modal__image { flex: 0 0 40%; background-size: cover; background-position: center; min-height: 550px; position: relative;}
.port-modal__details { display: flex; flex-direction: column; flex: 1 1 60%; padding: 35px; max-height: 550px; overflow: hidden; }
.port-modal__port-name { font-size: 28px; margin: 0 0 15px 0; font-weight: normal; color: #201818; flex-shrink: 0; }
.port-modal__description { font-size: 15px; line-height: 1.6; color: #201818; overflow-y: auto; flex-grow: 1; padding-right: 15px; margin-right: -15px; margin-bottom: 20px;}
.port-modal__description p:first-child { margin-top: 0; }
.port-modal__description p:last-child { margin-bottom: 0; }
.port-modal__meta { display: flex; flex-wrap: wrap; gap: 20px; border-top: 1px solid #e5e7eb; padding: 20px 0; align-items: center; flex-shrink: 0;}
.port-modal__meta-item h6 { margin: 0 0 5px 0; font-size: 12px; color: #6b7280; text-transform: uppercase; }
.port-modal__meta-item p { margin: 0; font-size: 16px; font-weight: 500; }
.port-modal__footer { margin-top: auto; padding-top: 20px; border-top: 1px solid #e5e7eb; flex-shrink: 0; }
.footer-text-section { text-align: center; margin-bottom: 20px; }
.footer-text-section h5 { font-size: 16px; color: #201818; margin: 0 0 5px 0; }
.footer-text-section p { font-size: 14px; color: #6b7280; margin: 0 auto; max-width: 350px; }
.footer-action-bar { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding-top: 20px; border-top: 1px solid #e5e7eb; }
.footer-contact { font-size: 14px; color: #4b5563; white-space: nowrap; }
.footer-contact a { color: #201818; text-decoration: none; font-weight: bold; }
.footer-actions { display: flex; align-items: center; gap: 10px; }

/* EDITED: Made this selector more specific to override theme styles */
.port-modal__footer .footer-nav-button { 
    background-color: #f1f1f1; 
    color: #333; 
    border: 1px solid #ddd; 
    cursor: pointer; 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    font-size: 20px; 
    font-weight: bold; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: background-color 0.2s ease, opacity 0.2s ease; 
    flex-shrink: 0; 
}
.port-modal__footer .footer-nav-button:hover { background-color: #e9e9e9; border-color: #ccc; }
.port-modal__footer .footer-nav-button:disabled { opacity: 0.4; cursor: not-allowed; }
.modal-cta-button { display: inline-block; background-color: #D96C4E; color: #fff !important; padding: 10px 20px !important; text-decoration: none !important; border-radius: 5px; font-family: "Merriweather Sans", sans-serif !important; font-size: 12px !important; font-weight: 400 !important; text-transform: uppercase !important; font-style: normal !important; line-height: 1em !important; letter-spacing: 1px !important; white-space: nowrap; }
.modal-cta-button:hover { background-color: #C85E42; }

/* --- Mobile Responsive Styles --- */
@media screen and (max-width: 767px) {
    .itinerary-table { display: none; }
    .itinerary-list-mobile { display: block; }
    .itinerary-list-mobile .itinerary-day { display: flex; padding: 16px; border-bottom: 1px solid #e5e7eb; }
    .itinerary-list-mobile .itinerary-day:last-child { border-bottom: none; }
    .itinerary-list-mobile .itinerary-day.clickable { cursor: pointer; }
    .itinerary-list-mobile .itinerary-day.non-clickable { cursor: default; }
    .itinerary-day__date { flex: 0 0 70px; text-align: center; border-right: 1px solid #e5e7eb; padding-right: 15px; margin-right: 15px; display: flex; flex-direction: column; justify-content: center; }
    .itinerary-day__date span { display: block; font-weight: bold; }
    .itinerary-day__date .day-short { font-size: 18px; color: #201818; }
    .itinerary-day__date .day-long { font-size: 12px; color: #6b7280; text-transform: uppercase; }
    .itinerary-day__info { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
    .itinerary-day__info .port-name { font-weight: bold; color: #201818; font-size: 15px; margin-bottom: 4px; }
    .itinerary-day__info .port-times { font-size: 13px; color: #6b7280; }
    .port-modal__content { flex-direction: column; height: 100%; width: 100%; max-width: 100%; border-radius: 0; }
    .port-modal__image { flex: 0 0 250px; min-height: initial; }
    .port-modal__details { max-height: none; }
    .footer-action-bar { flex-direction: column; }
    .footer-actions { width: 100%; justify-content: space-between; margin-top: 15px; order: 1;}
    .footer-contact { order: 2; margin-top: 15px; }
    .modal-cta-button { flex-grow: 1; margin: 0 10px; }
    .port-modal__footer .footer-nav-button { width: 48px; height: 48px; }
}

/* --- Desktop-only styles for footer --- */
@media screen and (min-width: 768px) {
    .footer-actions .footer-nav-button.prev { order: 2; }
    .footer-actions .footer-nav-button.next { order: 3; }
    .footer-actions .modal-cta-button { order: 1; }
    .footer-actions .modal-cta-button { border-right: 1px solid #e5e7eb; margin-right: 10px; padding-right: 20px; }
}