/* HKO Tide & Weather Widget Styles */

/* Widget Box Styles */
.hko-widget {
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    padding: 12px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: #fff;
}

.hko-widget__row {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
}

.hko-widget__label {
    color: #555;
    font-weight: 600;
}

.hko-widget__value {
    color: #111;
}

.hko-widget__footer {
    margin-top: 8px;
    color: #777;
    font-size: 12px;
}

.hko-widget__error {
    color: #b00020;
}

/* Banner Styles - Base */
.hko-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    z-index: 2147483647 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--hko-primary-color, #c62828);
    border-bottom: 3px solid var(--hko-accent-color, #f1c40f);
    color: #fff;
}

.hko-banner .inner {
    width: 100%;
    padding: 10px 16px;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 12px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hko-banner .inner::-webkit-scrollbar {
    display: none;
}

.hko-banner .title {
    font-weight: 700;
    letter-spacing: 0.3px;
}

.hko-banner .chip {
    background: rgba(255, 255, 255, 0.14);
    padding: 6px 10px;
    border-radius: 14px;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    font-size: 13px;
    line-height: 1.4;
    display: inline-block !important;
    width: auto !important;
    max-width: none !important;
}

.hko-banner .info-icon {
    background: #fff;
    color: var(--hko-primary-color, #c62828);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: help;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.hko-banner .close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.9;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
    flex-shrink: 0;
}

.hko-banner .close:hover {
    background: rgba(255, 255, 255, 0.3);
    opacity: 1;
}

/* Mobile Styles - Force horizontal scroll */
@media screen and (max-width: 640px) {
    .hko-banner {
        padding: 8px 0;
        margin-top: -160px;
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .hko-banner .inner {
        justify-content: flex-start !important;
        padding-right: 50px !important;
        gap: 10px;
        padding-left: 16px;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        min-width: max-content !important;
        width: max-content !important;
        max-width: none !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        /* Force hardware acceleration for smooth scrolling */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: scroll-position;
        /* Smooth scrolling for auto-scroll animation */
        scroll-behavior: smooth;
        /* Prevent momentum scrolling from interfering */
        overscroll-behavior-x: contain;
        /* Force single row layout */
        display: flex !important;
        align-items: center !important;
    }

    .hko-banner .chip {
        padding: 5px 9px;
        font-size: 12px;
        min-width: fit-content !important;
        max-width: none !important;
        width: auto !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        display: inline-block !important;
        /* Prevent text selection during scroll */
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        /* Prevent tap highlight */
        -webkit-tap-highlight-color: transparent;
        /* Force inline display */
        float: none !important;
        clear: none !important;
    }

    .hko-banner .info-icon {
        width: 22px;
        height: 22px;
        font-size: 12px;
        flex-shrink: 0 !important;
        -webkit-tap-highlight-color: transparent;
    }

    .hko-banner .close {
        right: 12px;
        width: 26px;
        height: 26px;
        font-size: 18px;
        flex-shrink: 0 !important;
        -webkit-tap-highlight-color: transparent;
    }

    /* Gradient fade edges on mobile for visual cue */
    .hko-banner .inner::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, var(--hko-primary-color, #c62828), transparent);
        pointer-events: none;
        z-index: 5;
    }

    .hko-banner .inner::after {
        content: "";
        position: absolute;
        right: 50px;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to left, var(--hko-primary-color, #c62828), transparent);
        pointer-events: none;
        z-index: 5;
    }
}

/* Extra small devices */
@media screen and (max-width: 480px) {
    .hko-banner .chip {
        padding: 4px 8px;
        font-size: 11px;
    }

    .hko-banner .inner {
        gap: 8px;
        padding-left: 12px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .hko-banner .inner {
        /* Increase touch target size */
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .hko-banner .chip {
        /* Better touch targets */
        min-height: 28px;
        display: inline-flex;
        align-items: center;
    }
}

