/* General Container - Renamed */
.tour-map-container {
    display: flex;
    flex-direction: row-reverse;
    height: 80vh;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    direction: rtl; /* Right to Left layout */
}

p {
    font-family: "yekanbakh", Sans-serif;
}

.detail-item, .form-field label {
    font-family: "yekanbakh";
}


/* Sidebar - Renamed */
.tours-list-sidebar {
    width: 350px;
    background-color: #f9f9f9;
    border-left: 1px solid #ddd; /* This is now on the left */
    display: flex;
    flex-direction: column;
    z-index: 10;
}
.tours-list-sidebar h3 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    text-align: right;
}
.tours-list {
    overflow-y: auto;
    flex-grow: 1;
}

/* Tour Item in List - Renamed */
.tour-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color .3s;
    align-items: center;
}
.tour-item:hover, .tour-item.active {
    background-color: #eaf2ff;
}
.tour-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    margin-left: 15px; /* Spacing between image and text */
}
.tour-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.tour-details {
    display: flex;
    flex-direction: column;
    text-align: right;
}
.tour-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: bold;
    color: #333;
}
.tour-meta {
    font-size: 13px;
    color: #555;
    display: flex;
    gap: 15px;
}
.tour-meta .dashicons {
    font-size: 16px;
    vertical-align: middle;
}


/* Map View */
.map-view {
    flex-grow: 1;
    height: 100%;
}

/* Info Card Container */
#tour-info-card-container {
    position: absolute;
    bottom: -100%; /* Start hidden */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    transition: bottom .4s ease-in-out;
    width: 450px;
    max-width: 95%;
    max-height: 80vh;
}
#tour-info-card-container.visible {
    bottom: 20px;
}
.tour-info-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* New Registration Form Styles */
.card-header {
    display: flex;
    padding: 15px;
    align-items: center;
    border-bottom: 1px solid #eee;
}
.close-card-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #eee;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}
.card-header .card-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    margin-left: 15px;
}
.card-header .card-image img {
    width: 100%; height: 100%; object-fit: cover; border-radius: 6px;
}
.card-header .card-details {
    text-align: right;
}
.card-header .card-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 5px;
}
.card-header .card-meta {
    font-size: 13px; color: #666; display: flex; gap: 15px;
}

.registration-form-body {
    padding: 15px;
    max-height: 50vh;
    overflow-y: auto;
}
.form-section, .form-row {
    margin-bottom: 15px;
}
.form-section h5 {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}
.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-row label {
    font-weight: bold;
    font-size: 13px;
    flex-shrink: 0;
}
.form-row input[type="number"], .form-row input[type="text"], .form-row input[type="date"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
#participant-fields fieldset {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    background: #f9f9f9;
}
#participant-fields legend {
    font-weight: bold;
    padding: 0 5px;
    font-size: 13px;
}

.optional-extras label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
}
.optional-extras input {
    margin-left: 8px;
}

.card-footer {
    padding: 15px;
    background: #f7f7f7;
    border-top: 1px solid #eee;
    text-align: center;
}
#final-cost-display {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}
#final-cost-display span {
    color: #007bff;
}
#register-btn {
    background-color: #28a745;
    color: #fff;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color .2s;
    border: none;
    cursor: pointer;
    width: 100%;
}
#register-btn:hover { background-color: #218838; }
#registration-response {
    margin-top: 15px;
    padding: 10px;
    border-radius: 5px;
    display: none;
}
#registration-response.success { background-color: #d4edda; color: #155724; }
#registration-response.error { background-color: #f8d7da; color: #721c24; }


/* Mobile Toggles */
.mobile-view-toggle { display: none; }

/* Responsive Styles */
@media (max-width: 768px) {
    .tour-map-container { height: 85vh; }
    .mobile-view-toggle {
        display: flex; position: absolute; bottom: 15px; left: 50%;
        transform: translateX(-50%); z-index: 1002;
        background: rgba(255, 255, 255, 0.95);
        border-radius: 30px; padding: 5px; box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    }
    .mobile-view-toggle button {
        border: none; background: transparent; padding: 8px 15px; cursor: pointer;
        font-weight: bold; color: #555; border-radius: 25px; transition: all 0.3s ease;
        font-size: 14px;
    }
    .mobile-view-toggle button.active { background: #007bff; color: #fff; }
    .tours-list-sidebar { display: none; }
    .map-view { display: block; width: 100%; height: 100%; }
    .tour-map-container.show-list-view .tours-list-sidebar {
        display: flex; width: 100%; height: 100%; border: none;
    }
    .tour-map-container.show-list-view .map-view { display: none; }
    #tour-info-card-container.visible { bottom: 75px; width: 95%; }
}

/* Map Label */
.tour-label {
    background-color: transparent; border: none; box-shadow: none;
    font-weight: bold; font-size: 13px; color: #333;
    text-shadow: 1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff;
}




/* ==========================================================================
   ✅ NEW: Tour Table Styles
   ========================================================================== */

.tour-table-container {
    width: 100%;
    margin: 30px auto;
    direction: rtl;
    font-family: "yekanbakh", sans-serif;
}

/* Tabs Navigation */
.tour-tabs {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    border-bottom: 2px solid #007bff;
}

.tour-tabs li {
    padding: 10px 20px;
    cursor: pointer;
    background-color: #f1f1f1;
    margin-left: 5px;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    color: #555;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.tour-tabs li:hover {
    background-color: #e0e0e0;
}

.tour-tabs li.active {
    background-color: #007bff;
    color: #fff;
    border-bottom: 2px solid #007bff;
}

/* Tab Content */
.tour-tab-content {
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    background-color: #fff;
}

.tour-tab-pane {
    display: none;
}

.tour-tab-pane.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Table Styles */
.tour-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.tour-table th,
.tour-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.tour-table thead tr {
    background-color: #f8f9fa;
}

.tour-table th {
    font-weight: bold;
    font-size: 14px;
}

.tour-table tbody tr:nth-of-type(even) {
    background-color: #f9f9f9;
}

.tour-table tbody tr:hover {
    background-color: #f1f1f1;
}

.tour-table-button {
    display: inline-block;
    padding: 6px 12px;
    background-color: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.2s;
}

.tour-table-button:hover {
    background-color: #218838;
    color: #fff;
}

/* Responsive Table */
@media screen and (max-width: 768px) {
    .tour-table thead {
        display: none;
    }
    .tour-table, .tour-table tbody, .tour-table tr, .tour-table td {
        display: block;
        width: 100%;
    }
    .tour-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        padding: 10px;
        border-radius: 5px;
    }
    .tour-table td {
        text-align: right;
        padding-left: 50%;
        position: relative;
        border: none;
        padding-bottom: 10px;
    }
    .tour-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
    }
}