/* Modern Reserve System Styles - Loaded Successfully - v1.0 */
.d-none {
    display: none !important;
}

.row {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

.row-space {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.dnc_table {
    padding-top: 10px;
    width: 100%;
}

.dnc_table td {
    text-align: center;
    padding: 5px 10px;
}

.dnc_table tr:nth-child(even) {
    border: 0;
    background-color: lightgray;
}

.dnc_table tfoot tr th {
    border-top: 1px solid black;
}

.dnc_table thead {
    font-size: 1.3em;
    position: sticky;
    top: 32px;
}

.dnc_table thead tr {
    background-color: lightgray;
    border-bottom: 1px solid black;
}

.dnc_table thead th {
    padding: 5px 10px;
}

.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.card {
    /* Add shadows to create the "card" effect */
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    border-radius: 16px;
}

/* On mouse-over, add a deeper shadow */
.card:hover {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

/* Add some padding inside the card container */
.container {
    padding: 2px 16px;
}

.text-center {
    text-align: center;
}

.p-2 {
    padding: 2em;
}

.m-2 {
    margin: 2em;
}

/* Modern Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: #ffffff;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #e0e0e3;
    border-radius: 8px;
    width: 90%;
    max-width: 90%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modern Table Styles */
.modern-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    background: white !important;
    border: none !important;
}

.modern-table thead {
    background: #f6f7f9 !important;
    color: #1d2327 !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #e0e0e3 !important;
}

.modern-table thead th {
    padding: 16px 20px;
    text-align: left;
    border: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f3f4;
}

.modern-table tbody tr:nth-child(even) {
    background-color: #fafbfc;
}

.modern-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

.modern-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-table tbody td {
    padding: 14px 20px;
    border: none;
    vertical-align: middle;
}

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

/* Modern Button Styles */
.btn-modern {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px 18px !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 36px !important;
    white-space: nowrap !important;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-primary-modern {
    background: #007cba !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.3) !important;
}

.btn-primary-modern:hover {
    background: #005a87 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.4) !important;
}

.btn-secondary-modern {
    background: #f0f0f1 !important;
    color: #1d2327 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.btn-secondary-modern:hover {
    background: #e0e0e3 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-outline-modern {
    background: transparent !important;
    color: #007cba !important;
    border: 1px solid #007cba !important;
}

.btn-outline-modern:hover {
    background: #007cba !important;
    color: white !important;
    transform: translateY(-1px) !important;
}

/* Modern Alert Styles */
.alert-modern {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 12px 0;
    display: flex;
    align-items: center;
    font-weight: 500;
    border: 1px solid #e0e0e3;
}

.alert-success {
    background: #f0f9f6;
    color: #1d2327;
    border-color: #4ab866;
}

.alert-warning {
    background: #fef8e7;
    color: #1d2327;
    border-color: #f0c33c;
}

.alert-danger {
    background: #fef2f2;
    color: #1d2327;
    border-color: #d63638;
}

/* Modern Card Styles */
.reserve-card {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e0e0e3 !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

.reserve-card:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.reserve-card-header {
    background: #f6f7f9 !important;
    color: #1d2327 !important;
    padding: 16px 20px !important;
    border-bottom: 1px solid #e0e0e3 !important;
}

.reserve-card-body {
    padding: 20px !important;
}

/* Special styles for map container */
.map-container {
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    overflow: visible !important;
    margin: 16px 0 !important;
    border: 1px solid #e0e0e3 !important;
}

.map-content {
    padding: 16px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: visible !important;
    display: block !important;
    text-align: center !important;
    min-height: 250px !important;
    position: relative !important;
}

/* Ensure SVG maps are fully visible */
.map-content svg {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
}

/* Additional mobile SVG fixes */
@media (max-width: 768px) {
    .map-content svg {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        object-fit: contain !important;
    }

    /* Ensure the map container takes full available height */
    #uptable {
        display: block !important;
        width: 100% !important;
    }

    #uptable .reserve-card {
        width: 100% !important;
        display: block !important;
    }
}

/* Additional Modern Enhancements */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.section-spacing {
    margin-bottom: 40px;
}

.price-highlight {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.discount-badge {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 8px;
}

/* Enhanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Enhanced Tooltip */
.tooltip-modern {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip-modern .tooltiptext-modern {
    visibility: hidden;
    width: 200px;
    background: linear-gradient(135deg, #333 0%, #555 100%);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 12px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tooltip-modern .tooltiptext-modern::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip-modern:hover .tooltiptext-modern {
    visibility: visible;
    opacity: 1;
    transform: translateY(-5px);
}

/* Mobile Table Styles */
.mobile-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-table-responsive .modern-table {
    min-width: 500px;
}

/* Mobile Card Adjustments */
@media (max-width: 768px) {
    .page-container {
        padding: 8px;
    }

    .reserve-card {
        margin: 8px 0;
        border-radius: 6px;
    }

    .reserve-card-header {
        padding: 10px 12px;
        border-radius: 6px 6px 0 0;
    }

    .reserve-card-body {
        padding: 10px 12px;
    }

    /* Ultra compact table for mobile */
    .modern-table {
        font-size: 12px;
        border-radius: 6px;
        border-spacing: 0;
    }

    .modern-table thead th,
    .modern-table tbody td {
        padding: 6px 8px;
        white-space: nowrap;
        border-bottom: 1px solid #e0e0e3;
    }

    .modern-table thead th {
        font-size: 11px;
        padding: 8px 6px;
        font-weight: 600;
    }

    .modern-table tbody td {
        line-height: 1.3;
    }

    /* Compact button layout on mobile */
    .btn-modern {
        padding: 6px 12px;
        font-size: 11px;
        min-height: 28px;
        border-radius: 4px;
        line-height: 1.2;
    }

    .btn-modern span {
        font-size: 12px;
        margin-right: 4px;
    }

    /* Even more compact on very small screens */
    @media (max-width: 480px) {
        .btn-modern {
            padding: 5px 10px;
            font-size: 10px;
            min-height: 26px;
        }

        .btn-modern span {
            font-size: 11px;
            margin-right: 3px;
        }
    }

    /* Mobile button text hiding */
    .btn-text-mobile {
        display: inline;
        margin-left: 6px;
    }

    /* Hide button text on very small screens */
    @media (max-width: 480px) {
        .btn-text-mobile {
            display: none;
        }

        .btn-modern {
            padding: 8px 10px;
            min-width: 40px;
            justify-content: center;
        }
    }

    /* Mobile modal adjustments */
    .modal-content {
        width: 95%;
        margin: 5% auto;
        border-radius: 12px;
    }

    .modal-body {
        padding: 20px !important;
    }

    .section-spacing {
        margin-bottom: 12px;
    }

    .alert-modern {
        font-size: 12px;
        padding: 8px 12px;
        margin: 8px 0;
        border-radius: 6px;
    }

    /* Mobile map container - allow full visibility */
    #uptable {
        margin: 16px 0 !important;
        border-radius: 12px;
        max-height: none !important;
        overflow: visible !important;
    }

    #uptable .reserve-card,
    #uptable .map-container {
        border-radius: 12px !important;
        max-height: none !important;
        overflow: visible !important;
    }

    #uptable .map-content {
        padding: 10px !important;
        min-height: 200px !important;
        max-height: none !important;
        overflow: visible !important;
    }

    /* Keep SVG at full size */
    #uptable .map-content svg {
        max-width: 100% !important;
        height: auto !important;
        transform: none !important;
    }

    /* Allow full map visibility on mobile */
    @media (max-width: 480px) {
        #uptable {
            margin: 16px 0 !important;
            max-height: none !important;
            overflow: visible !important;
        }

        #uptable .reserve-card,
        #uptable .map-container {
            max-height: none !important;
            overflow: visible !important;
        }

        #uptable .map-content {
            min-height: 200px !important;
            max-height: none !important;
            padding: 10px !important;
            overflow: visible !important;
        }

        /* Ensure SVG displays at full size */
        #uptable .map-content svg {
            transform: none !important;
            max-width: 100% !important;
            height: auto !important;
            display: block !important;
        }
    }
}

    /* Extra small mobile adjustments */
    .modern-table {
        font-size: 11px;
    }

    .modern-table thead th,
    .modern-table tbody td {
        padding: 6px 4px;
    }

    .card-header-modern,
    .card-body-modern {
        padding: 12px;
    }

    .btn-modern {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 36px;
    }

    .alert-modern {
        font-size: 12px;
        padding: 8px 12px;
    }

    /* Buttons side by side on tablets, stacked on phones */
    .btn-group-mobile {
        flex-direction: row !important;
        gap: 12px !important;
        margin-top: 20px !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    .btn-group-mobile .btn-modern {
        flex: 1 !important;
        max-width: 180px !important;
        min-width: 140px !important;
        margin-bottom: 0 !important;
    }

    /* On medium tablets, make buttons slightly smaller */
    @media (max-width: 600px) {
        .btn-group-mobile {
            gap: 10px !important;
        }

        .btn-group-mobile .btn-modern {
            max-width: 160px !important;
            min-width: 120px !important;
        }
    }
}

@media (max-width: 480px) {
    /* Stack buttons vertically on phones */
    .btn-group-mobile {
        flex-direction: column !important;
        gap: 8px !important;
        margin-top: 16px !important;
    }

    .btn-group-mobile .btn-modern {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
    }

    /* Super compact table for very small screens */
    .modern-table {
        font-size: 11px;
        border-radius: 4px;
    }

    .modern-table thead th,
    .modern-table tbody td {
        padding: 4px 6px;
        border-bottom: 1px solid #e0e0e3;
    }

    .modern-table thead th {
        font-size: 10px;
        padding: 6px 4px;
        font-weight: 600;
    }

    .modern-table tbody td {
        line-height: 1.2;
    }

    .modern-table tbody tr {
        height: 32px;
    }

    /* Ultra compact for very small phones */
    @media (max-width: 360px) {
        .modern-table {
            font-size: 10px;
        }

        .modern-table thead th,
        .modern-table tbody td {
            padding: 3px 4px;
        }

        .modern-table thead th {
            font-size: 9px;
            padding: 4px 3px;
        }

        .modern-table tbody tr {
            height: 28px;
        }
    }

    .reserve-card-header,
    .reserve-card-body {
        padding: 10px 12px;
    }

    .btn-modern {
        padding: 12px 16px;
        font-size: 14px;
    }
}
