/* Makana Ferry Schedule Frontend Styles */

:root {
    --ferry-primary-color: #2196F3;
    --ferry-font-family: inherit;
}

.makana-ferry-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--ferry-font-family);
    position: relative;
}

/* Mobile Menu Toggle */
.ferry-mobile-menu-toggle {
    display: none;
    background: var(--ferry-primary-color);
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: 4px;
    margin-bottom: 15px;
}

.ferry-hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    transition: 0.3s;
}

/* Tab Navigation */
.ferry-tabs-nav {
    display: flex;
    background: #fff;
    border-bottom: 3px solid var(--ferry-primary-color);
    overflow-x: auto;
}

.ferry-tab-button {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: #f5f5f5;
    border: none;
    border-right: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.ferry-tab-button:last-child {
    border-right: none;
}

.ferry-tab-button:hover {
    background: #e8e8e8;
}

.ferry-tab-button.active {
    background: var(--ferry-primary-color);
    color: #fff;
}

/* Tab Content */
.ferry-tabs-content {
    background: #fff;
}

.ferry-tab-panel {
    display: none;
    padding: 20px;
}

.ferry-tab-panel.active {
    display: block;
}

/* Schedule Layout */
.makana-ferry-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

/* Schedule Tables */
.makana-ferry-tables {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ferry-route-table table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}



.ferry-column-headers th {
    background: var(--ferry-primary-color);
    color: #fff;
    padding: 10px 15px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.ferry-route-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.ferry-route-table tbody tr:last-child {
    border-bottom: none;
}

.ferry-route-table tbody tr:nth-child(even) {
    background: #f2f2f2;
}

.ferry-route-table tbody td {
    padding: 12px 15px;
    text-align: center;
    font-size: 14px;
    color: #333;
}

.ferry-route-table tbody td:first-child {
    font-weight: 600;
}

/* Island Image */
.ferry-island-image {
    position: sticky;
    top: 20px;
}

.ferry-island-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    object-fit: cover;
    max-height: 500px;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    /* Show mobile menu toggle */
    .ferry-mobile-menu-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        background: var(--ferry-primary-color);
        color: #fff;
        border: none;
        padding: 15px 20px;
        cursor: pointer;
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 0;
        border-radius: 4px;
        transition: border-radius 0.3s;
    }

    .ferry-mobile-menu-toggle.active {
        border-radius: 4px 4px 0 0;
    }

    .ferry-hamburger-icon {
        display: block;
        width: 25px;
        height: 19px;
        position: relative;
    }

    .ferry-hamburger {
        display: block;
        width: 100%;
        height: 3px;
        background: #fff;
        position: absolute;
        left: 0;
        transition: 0.3s;
    }

    .ferry-hamburger:nth-child(1) {
        top: 0;
    }

    .ferry-hamburger:nth-child(2) {
        top: 8px;
    }

    .ferry-hamburger:nth-child(3) {
        top: 16px;
    }

    /* Hide tabs by default on mobile */
    .ferry-tabs-nav {
        display: none;
        flex-direction: column;
        border-bottom: none;
        margin-bottom: 20px;
        background: #f5f5f5;
        border-radius: 0 0 4px 4px;
        overflow: hidden;
    }

    .ferry-tabs-nav.mobile-open {
        display: flex;
    }

    .ferry-tab-button {
        border: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 15px 20px;
        text-align: left;
        width: 100%;
        background: #f5f5f5;
    }

    .ferry-tab-button:last-child {
        border-bottom: none;
    }

    .ferry-tab-button.active {
        display: none;
    }

    /* Single column layout on mobile */
    .makana-ferry-layout {
        grid-template-columns: 1fr;
    }

    /* Image below tables on mobile */
    .ferry-island-image {
        position: static;
        order: 2;
    }

    .makana-ferry-tables {
        order: 1;
    }

    /* Hamburger menu animation */
    .ferry-mobile-menu-toggle.active .ferry-hamburger:nth-child(1) {
        transform: rotate(-45deg);
        top: 8px;
    }

    .ferry-mobile-menu-toggle.active .ferry-hamburger:nth-child(2) {
        opacity: 0;
    }

    .ferry-mobile-menu-toggle.active .ferry-hamburger:nth-child(3) {
        transform: rotate(45deg);
        top: 8px;
    }
}

@media (max-width: 480px) {
    .ferry-tab-panel {
        padding: 15px 10px;
    }

    .ferry-column-headers th {
        font-size: 10px;
        padding: 6px 8px;
    }

    .ferry-route-table tbody td {
        font-size: 11px;
        padding: 8px 6px;
    }
}

/* Print Styles */
@media print {
    .ferry-mobile-menu-toggle {
        display: none;
    }

    .ferry-tabs-nav {
        display: none;
    }

    .ferry-tab-panel {
        display: block !important;
        page-break-after: always;
    }

    .ferry-island-image {
        display: none;
    }
}