/* ==========================================================================
   Shoalwater Tavern - Custom Extensions & Responsive Improvements
   ========================================================================== */

/* Prevent horizontal overflow across the entire page */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

/* --------------------------------------------------------------------------
   Food Menu Section (.menu-book) Responsiveness & Fixes
   -------------------------------------------------------------------------- */

/* Section base & padding */
#menu.menu-book {
    padding: 60px 0;
    position: relative;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

@media screen and (max-width: 991px) {
    #menu.menu-book {
        padding: 45px 0;
    }
}

@media screen and (max-width: 767px) {
    #menu.menu-book {
        padding: 35px 0;
    }
}

/* Tab Links / Category Navigation */
.tabs .tab-links {
    margin-bottom: 45px;
    max-width: 100%;
}

.tabs .tab-links ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

@media screen and (max-width: 991px) {
    .tabs .tab-links {
        margin-bottom: 30px;
    }
    .tabs .tab-links .item-link {
        font-size: 18px;
        margin: 0 6px;
        padding-right: 14px;
    }
}

@media screen and (max-width: 767px) {
    .tabs .tab-links {
        margin-bottom: 25px;
        padding: 0 4px;
        overflow-x: hidden;
    }
    .tabs .tab-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 8px 8px;
        padding: 0;
        margin: 0;
    }
    .tabs .tab-links ul li,
    .tabs .tab-links .item-link {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-family: inherit !important;
        font-size: 13px !important;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        line-height: 1.3 !important;
        padding: 7px 13px !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(193, 157, 96, 0.35);
        border-radius: 20px;
        color: #ffffff !important;
        cursor: pointer;
        transition: all 0.25s ease-in-out;
        white-space: normal !important;
        text-align: center;
        max-width: 100%;
        box-sizing: border-box;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
    .tabs .tab-links .item-link:after {
        display: none !important;
    }
    .tabs .tab-links .item-link.current,
    .tabs .tab-links .item-link:active,
    .tabs .tab-links .item-link:hover {
        background: #C19D60 !important;
        border-color: #C19D60 !important;
        color: #121212 !important;
        font-weight: 600 !important;
        box-shadow: 0 3px 10px rgba(193, 157, 96, 0.35);
    }
}

/* Menu Items & Flexbox Structure */
.menu-book .menu-list {
    margin-bottom: 28px;
    max-width: 100%;
}

.menu-book .menu-list .item {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
    line-height: normal;
}

.menu-book .menu-list .img {
    float: none;
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    margin-right: 16px;
    display: block;
    line-height: 0;
}

.menu-book .menu-list .img img {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 1px solid rgba(193, 157, 96, 0.35);
    transition: transform 0.3s ease;
}

.menu-book .menu-list .item:hover .img img {
    transform: scale(1.05);
}

.menu-book .menu-list .item-cont,
.menu-book .menu-list .item > div:not(.img) {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    overflow: hidden;
}

.menu-book .menu-list .flex {
    display: flex;
    align-items: baseline;
    width: 100%;
    min-width: 0;
}

.menu-book .menu-list .flex .title {
    flex: 0 1 auto;
    min-width: 0;
    color: #fff;
    font-family: 'Libre Caslon Display', serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: break-word;
}

.menu-book .menu-list .flex .dots {
    flex: 1 1 20px;
    min-width: 12px;
    position: relative;
    margin: 0 12px;
    align-self: center;
    height: 10px;
}

.menu-book .menu-list .flex .dots:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}

.menu-book .menu-list .flex .price {
    flex: 0 0 auto;
    margin-left: auto;
    font-family: 'Libre Caslon Display', serif;
    font-size: 18px;
    color: #C19D60;
    font-weight: 400;
    line-height: 1.35;
    white-space: nowrap;
    padding-left: 4px;
    text-align: right;
}

.menu-book .menu-list p,
.menu-book .menu-list .dish-desc {
    margin: 4px 0 0 0;
    line-height: 1.4;
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.65);
    word-break: normal;
    overflow-wrap: break-word;
}

/* Mobile & Tablet Optimizations */
@media screen and (max-width: 767px) {
    .menu-book .menu-list {
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    
    .menu-book .menu-list:last-child {
        margin-bottom: 10px;
        border-bottom: none;
    }
    
    .menu-book .menu-list .item {
        align-items: flex-start;
    }
    
    .menu-book .menu-list .img {
        flex: 0 0 50px;
        width: 50px;
        height: 50px;
        margin-right: 12px;
        margin-top: 2px;
    }
    
    .menu-book .menu-list .img img {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
    }
    
    .menu-book .menu-list .item-cont,
    .menu-book .menu-list .item > div:not(.img) {
        max-width: calc(100% - 62px);
    }

    .menu-book .menu-list .flex {
        align-items: baseline;
        justify-content: space-between;
    }
    
    .menu-book .menu-list .flex .title {
        font-size: 15.5px;
        line-height: 1.3;
        flex: 1 1 auto;
        padding-right: 8px;
    }
    
    /* Dots collapse gracefully on mobile to give maximum room to title & price */
    .menu-book .menu-list .flex .dots {
        display: none !important;
    }
    
    .menu-book .menu-list .flex .price {
        font-size: 15.5px;
        line-height: 1.3;
        font-weight: 600;
        margin-left: auto;
    }
    
    .menu-book .menu-list p,
    .menu-book .menu-list .dish-desc {
        font-size: 12.5px;
        margin-top: 3px;
    }
}

/* Small mobile devices (iPhone SE, Galaxy A series, 320px-390px) */
@media screen and (max-width: 420px) {
    .tabs .tab-links .item-link {
        font-size: 12px !important;
        padding: 6px 10px !important;
    }
    
    .menu-book .menu-list .img {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        margin-right: 10px;
    }
    
    .menu-book .menu-list .img img {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .menu-book .menu-list .item-cont,
    .menu-book .menu-list .item > div:not(.img) {
        max-width: calc(100% - 54px);
    }

    .menu-book .menu-list .flex .title {
        font-size: 14.5px;
    }
    
    .menu-book .menu-list .flex .price {
        font-size: 14.5px;
    }
    
    .menu-book .menu-list p,
    .menu-book .menu-list .dish-desc {
        font-size: 12px;
    }
}
