/* iOS Liquid Glass Stations Panel Styles */

#wx-stations {
    position: fixed;
    right: 0px !important;
    bottom: 0px;
    left: auto;
    max-width: min(500px, 100vw);
    width: 100%;
    height: clamp(50vh, 70vh, 85vh);
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: none !important;
    border-radius: 0 0 0 0 !important;
    box-shadow: 0 -8px 32px 0 rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.95);
}

.offcanvas.offcanvas-bottom {
    border-radius: 0 0 0 0 !important;
    border: none !important;
    background: rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

.offcanvas {
    border: none !important;
}

.offcanvas-header {
    position: absolute;
    z-index: 2;
    width: 100%;
    border: none !important;
    border-bottom: none !important;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: clamp(60px, 10vh, 80px);
    height: auto;
    padding: clamp(12px, 2.5vw, 20px) clamp(16px, 3vw, 24px);
    padding-top: max(clamp(12px, 2.5vw, 20px), env(safe-area-inset-top));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 0 0 0 0 !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

.offcanvas-title {
    font-size: clamp(16px, 3vw, 22px);
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.btn-close {
    width: clamp(44px, 8vw, 56px);
    height: clamp(44px, 8vw, 56px);
    min-width: clamp(44px, 8vw, 56px);
    min-height: clamp(44px, 8vw, 56px);
    border-radius: clamp(8px, 1.5vw, 12px);
    background: transparent !important;
    border: none !important;
    opacity: 0.9;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: clamp(10px, 2vw, 14px);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: clamp(16px, 3vw, 24px) clamp(16px, 3vw, 24px) !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.btn-close:active {
    transform: scale(0.95);
}

.btn-close.text-reset {
    color: rgba(255, 255, 255, 0.9) !important;
}

.offcanvas-body {
    padding: 0px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.offcanvas-body::-webkit-scrollbar {
    width: 6px;
}

.offcanvas-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.offcanvas-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.offcanvas-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.dt-length {
    display: none;
}

.dt-layout-start,
.d-md-flex.justify-content-between.align-items-center.dt-layout-start {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

.dt-container {
    overflow-x: hidden !important;
    padding-top: 60px;
    padding-right: 16px;
    padding-bottom: 16px;
    padding-left: 16px;
    width: 100%;
    box-sizing: border-box;
    max-width: 100%;
}

/* DataTables Table Styling */
#wx-stations-table {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: separate;
    border-spacing: 0 8px;
    table-layout: auto;
    box-sizing: border-box;
}

#wx-stations-table.table,
#wx-stations-table.table-striped {
    background: transparent !important;
}

#wx-stations-table thead {
    display: none;
}

#wx-stations-table.table-striped > tbody > tr:nth-of-type(odd) > td,
#wx-stations-table.table-striped > tbody > tr:nth-of-type(even) > td {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.95) !important;
}

#wx-stations-table tbody tr {
    background: rgba(0, 0, 0, 0.05) !important;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: none !important;
    border-radius: clamp(10px, 2vw, 14px);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    margin-bottom: clamp(6px, 1.5vw, 10px);
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.1);
    touch-action: manipulation;
    min-height: clamp(44px, 8vw, 56px);
}

#wx-stations-table tbody tr.table-striped,
#wx-stations-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.05) !important;
}

#wx-stations-table tbody tr:nth-child(odd) {
    background: rgba(0, 0, 0, 0.05) !important;
}

#wx-stations-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.25);
}

#wx-stations-table tbody tr:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
}

#wx-stations-table tbody td {
    padding: clamp(14px, 3vw, 20px) clamp(16px, 3.5vw, 24px);
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: clamp(14px, 2.5vw, 18px);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    border: none !important;
    vertical-align: middle;
    background: transparent !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 0;
    min-height: clamp(44px, 8vw, 56px);
}

#wx-stations-table tbody td:nth-child(4) {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
}

#wx-stations-table tbody td:nth-child(5) {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

#wx-stations-table tbody td:nth-child(6) {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.dt-column-title {
    font-weight: normal;
    text-shadow: 0px 0px 0px rgba(0, 0, 0, 0.1) !important;
}

/* DataTables Search Box */
.dataTables_filter {
    padding: 0 24px 16px 24px;
    margin-top: 0;
    border: none !important;
    border-bottom: none !important;
    position: relative;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.dataTables_filter label {
    position: relative;
    width: 100%;
    display: block;
    margin: 0;
    color: transparent;
}

.dataTables_filter label::before {
    content: 'search';
    font-family: 'Material Symbols Outlined';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    pointer-events: none;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    z-index: 1;
}

.dataTables_filter input[type="search"],
.form-control,
.form-control-sm {
    width: 100%;
    padding: clamp(14px, 3vw, 18px) clamp(16px, 3.5vw, 20px) clamp(14px, 3vw, 18px) clamp(40px, 7vw, 48px);
    min-height: clamp(44px, 8vw, 56px);
    border: none !important;
    border-radius: clamp(12px, 2vw, 16px);
    background: rgba(255, 255, 255, 1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: rgba(0, 0, 0, 0.9);
    font-size: clamp(15px, 2.5vw, 18px);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    margin-right: clamp(12px, 2.5vw, 20px);
    max-width: calc(100% - clamp(12px, 2.5vw, 20px));
    box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
}

.form-control,
.form-control-sm {
    margin-right: 16px !important;
    max-width: calc(100% - 16px) !important;
    box-sizing: border-box !important;
}

.dataTables_filter input[type="search"]::placeholder,
.form-control::placeholder,
.form-control-sm::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.dataTables_filter input[type="search"]:focus,
.form-control:focus,
.form-control-sm:focus {
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.15);
}

#dt-search-0 {
    width: 100%;
}

/* DataTables Pagination */
.dataTables_wrapper .dataTables_paginate {
    padding: clamp(12px, 2.5vw, 20px) clamp(16px, 3vw, 24px);
    padding-bottom: max(clamp(12px, 2.5vw, 20px), env(safe-area-inset-bottom));
    border: none !important;
    border-top: none !important;
    background: rgba(40, 70, 110, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    text-align: center;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 8px 12px;
    margin: 0 4px;
    border-radius: 10px;
    background: rgba(180, 180, 180, 0.5) !important;
    border: 1px solid rgba(160, 160, 160, 0.4) !important;
    color: #000000 !important;
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 
        inset 0 -2px 0 rgba(180, 180, 180, 0.6),
        inset 0 -1px 0 rgba(160, 160, 160, 0.4) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(200, 200, 200, 0.6) !important;
    border: 1px solid rgba(160, 160, 160, 0.4) !important;
    transform: none;
    color: #000000 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: rgba(150, 200, 255, 0.6) !important;
    border: 1px solid rgba(100, 180, 255, 0.5) !important;
    color: #000000 !important;
    box-shadow: 
        inset 0 1px 4px rgba(0, 150, 255, 0.3),
        inset 0 -1px 4px rgba(0, 150, 255, 0.15),
        0 0 8px rgba(0, 150, 255, 0.4),
        0 0 16px rgba(0, 150, 255, 0.25),
        0 0 24px rgba(0, 150, 255, 0.15) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    background: rgba(180, 180, 180, 0.3) !important;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: 
        inset 0 -2px 0 rgba(180, 180, 180, 0.5),
        inset 0 -1px 0 rgba(160, 160, 160, 0.3) !important;
}

.dataTables_wrapper .dataTables_info {
    padding: 16px 24px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
    text-align: center;
}

.page-link,
.dataTables_wrapper .dataTables_paginate .page-link,
.pagination .page-link,
.dt-paging-button.page-item .page-link,
.dt-paging-button.page-item:first-child .page-link,
.dt-paging-button.page-item:last-child .page-link,
.dt-paging-button.page-item.disabled .page-link {
    margin: clamp(4px, 1vw, 8px);
    padding: clamp(10px, 2vw, 14px) clamp(14px, 2.5vw, 18px);
    min-width: clamp(44px, 8vw, 56px);
    min-height: clamp(44px, 8vw, 56px);
    border-radius: clamp(8px, 1.5vw, 12px) !important;
    border-top-left-radius: clamp(8px, 1.5vw, 12px) !important;
    border-top-right-radius: clamp(8px, 1.5vw, 12px) !important;
    border-bottom-left-radius: clamp(8px, 1.5vw, 12px) !important;
    border-bottom-right-radius: clamp(8px, 1.5vw, 12px) !important;
    background: rgba(180, 180, 180, 0.5) !important;
    border: 1px solid rgba(160, 160, 160, 0.4) !important;
    color: #000000 !important;
    font-size: clamp(13px, 2.5vw, 16px);
    font-weight: 700 !important;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 -2px 0 rgba(180, 180, 180, 0.6),
        inset 0 -1px 0 rgba(160, 160, 160, 0.4) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-link:hover,
.dataTables_wrapper .dataTables_paginate .page-link:hover,
.pagination .page-link:hover {
    background: rgba(200, 200, 200, 0.6) !important;
    border: 1px solid rgba(160, 160, 160, 0.4) !important;
    color: #000000 !important;
}

.page-item.active .page-link,
.dataTables_wrapper .dataTables_paginate .page-item.active .page-link,
.pagination .page-item.active .page-link {
    background: rgba(150, 200, 255, 0.6) !important;
    border: 1px solid rgba(100, 180, 255, 0.5) !important;
    color: #000000 !important;
    box-shadow: 
        inset 0 1px 4px rgba(0, 150, 255, 0.3),
        inset 0 -1px 4px rgba(0, 150, 255, 0.15),
        0 0 8px rgba(0, 150, 255, 0.4),
        0 0 16px rgba(0, 150, 255, 0.25),
        0 0 24px rgba(0, 150, 255, 0.15) !important;
}

.page-item.disabled .page-link,
.dataTables_wrapper .dataTables_paginate .page-item.disabled .page-link,
.pagination .page-item.disabled .page-link {
    background: rgba(180, 180, 180, 0.3) !important;
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: 
        inset 0 -2px 0 rgba(180, 180, 180, 0.5),
        inset 0 -1px 0 rgba(160, 160, 160, 0.3) !important;
    color: #000000 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #wx-stations {
        max-width: 100%;
        height: calc(80vh);
        border-radius: 24px 24px 0 0;
    }

    .offcanvas-header {
        height: 56px;
        padding: 14px 20px;
        border-radius: 24px 24px 0 0;
    }

    .offcanvas-title {
        font-size: 16px;
    }

    .dt-container {
        padding-top: 56px;
        padding: 56px 12px 12px 12px;
    }

    #wx-stations-table tbody td {
        padding: 14px 16px;
        font-size: 14px;
    }

    .dataTables_filter {
        padding: 14px 20px;
    }

    .dataTables_filter input[type="search"] {
        padding: 11px 14px 11px 36px;
        font-size: 14px;
    }

    .dataTables_wrapper .dataTables_paginate {
        padding: 14px 20px;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    #wx-stations {
        height: calc(85vh);
        border-radius: 20px 20px 0 0;
    }

    .offcanvas-header {
        height: 52px;
        padding: 12px 18px;
        border-radius: 20px 20px 0 0;
    }

    .offcanvas-title {
        font-size: 15px;
    }

    .btn-close {
        width: 32px;
        height: 32px;
    }

    .dt-container {
        padding: 52px 10px 10px 10px;
    }

    #wx-stations-table tbody td {
        padding: 12px 14px;
        font-size: 13px;
    }

    .dataTables_filter {
        padding: 12px 18px;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 5px 8px;
        font-size: 12px;
        margin: 0 2px;
    }
}
