/* General Body and Layout Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background-color: #f4f7f6;
  /* This prevents side-scrolling when the menu is open on mobile */
  overflow-x: hidden;
}

/* --- Sidebar Styles --- */
.sidebar {
  width: 220px;
  background: #2c3e50;
  color: #ecf0f1;
  padding: 20px;
  height: 100%; 
  position: fixed; 
  top: 0;
  left: 0;
  box-sizing: border-box;
  z-index: 1000; 
  transform: translateX(0);
  transition: transform 0.3s ease-in-out;
}

/* --- Main Content Area --- */
.main-content {
  margin-left: 220px; 
  padding: 1px 20px 40px 20px;
  transition: margin-left 0.3s ease-in-out;
}

/* --- Styles for when the sidebar is hidden --- */
body.sidebar-hidden .sidebar {
    transform: translateX(-100%); 
}
body.sidebar-hidden .main-content {
    margin-left: 0; 
}


/* --- Menu Button (Works on all screen sizes) --- */
.menu-btn {
    background: #2c3e50;
    color: white;
    border: 1px solid #4e6a85;
    padding: 8px 12px;
    font-size: 20px;
    cursor: pointer;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1002;
    border-radius: 4px;
}

/* --- Other Shared Styles --- */
.sidebar h2 { margin-top: 0; text-align: center; border-bottom: 1px solid #34495e; padding-bottom: 15px; }
.sidebar .tabs { list-style: none; padding: 0; margin-top: 20px; }
.sidebar .tabs li { margin: 10px 0; border-radius: 4px; background-color: #34495e; }
.sidebar .tabs li a { color: #ecf0f1; text-decoration: none; display: block; padding: 12px; }
.sidebar .tabs li.active { background-color: #2980b9; }
h1, h3 { color: #2c3e50; }
h1 { text-align: center; margin-top: 20px; margin-bottom: 30px; font-size: 24px; }
h3 { margin-top: 30px; margin-bottom: 15px; border-bottom: 2px solid #bdc3c7; padding-bottom: 8px; font-size: 18px; }
.row { display: flex; gap: 25px; margin-bottom: 15px; }
.col { flex: 1; display: flex; flex-direction: column; }
label { font-weight: bold; margin-bottom: 6px; font-size: 14px; color: #34495e; }
input[type="text"], input[type="number"], input[type="date"], select, textarea { padding: 10px; border: 1px solid #bdc3c7; border-radius: 4px; font-family: Arial, sans-serif; font-size: 14px; width: 100%; box-sizing: border-box; }
textarea { resize: vertical; }
.meal-options, .services-options { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; padding: 15px; background: #fff; border-radius: 4px; border: 1px solid #bdc3c7; }
.meal-options label, .checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: normal; margin-bottom: 0; cursor: pointer; font-size: 14px; }
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-bottom: 15px; background-color: #fff; }
table, th, td { border: 1px solid #bdc3c7; }
th, td { padding: 10px; text-align: left; vertical-align: middle; }
th { background: #34495e; color: #fff; font-size: 13px; }
.btn, #addRowBtn, .removeBtn, .action-btn { border: none; border-radius: 4px; cursor: pointer; font-weight: bold; padding: 10px 15px; color: #fff; }
#addRowBtn { background: #27ae60; margin-bottom: 20px; }
.removeBtn { background: #e74c3c; padding: 0; font-size: 16px; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 0%; }
.btn { display: block; width: 100%; background: #2980b9; font-size: 18px; margin-top: 30px; }
.action-btn { font-size: 12px; padding: 6px 10px; margin-right: 5px; }
.load-btn { background-color: #2980b9; }
.delete-btn { background-color: #c0392b; }

/* ------------- MOBILE RESPONSIVENESS (Screens 768px or less) ------------- */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 60px 1px 20px 1px; /* Add top padding to not be under the button */
    }
    .container {
        padding: 0 10px;
    }
    .row {
        flex-direction: column;
        gap: 0;
    }
    .col {
        margin-bottom: 15px;
    }

    /* --- Itinerary Card View for Mobile --- */
    #itineraryTable thead { display: none; }
    #itineraryTable, #itineraryTable tbody, #itineraryTable tr, #itineraryTable td {
        display: block; width: 100%;
    }
    #itineraryTable tr {
        margin-bottom: 15px; border: 1px solid #ddd; border-radius: 4px; padding: 10px; box-sizing: border-box;
    }
    #itineraryTable td {
        display: flex; justify-content: space-between; align-items: center; border: none; padding: 8px 0; border-bottom: 1px solid #eee;
    }
    #itineraryTable td:last-child {
        border-bottom: none;
    }
    #itineraryTable td:before {
        content: attr(data-label); font-weight: bold; width: 40%;
    }
    #itineraryTable td > * {
        width: 60%;
    }
    #itineraryTable td.action-cell {
        justify-content: center;
    }
}
