/* Sidebar Text White */
.nav-sidebar .nav-link {
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 500;
}

/* Active link style */
.nav-sidebar .nav-link.active {
    background-color: #1e88e5 !important;
    color: #fff !important;
}

/* أيقونة بجانب النص */
.nav-sidebar .nav-link i {
    font-size: 16px;
}

/* تحسين المسافات */
.nav-sidebar .nav-link p {
    margin: 0;
}


.pagination .page-link {
    color: #fff;
    background-color: #343a40; /* نفس لون الـ sidebar */
    border: none;
    margin: 0px 5px;
}
.pagination .page-item.active .page-link {
    background-color: #0d6efd;
}



.nav-sidebar .nav-link {
    display: flex;
    align-items: center;
}
.nav-sidebar .nav-icon {
    margin-right: .5rem;
}

/* Submenu styling */
.sidebar-menu  .nav-treeview > .nav-item > .nav-link {
    background-color: #2f3e4e;   /* لون مختلف عن الـ parent */
    margin-left: 0.5rem;           /* مسافة من الشمال */
    border-radius: 4px;
    margin-bottom: 4px;          /* مسافة بين العناصر */
    padding-left: 30px;          /* يخلي الأيقونة والنص يبعدوا شويه */
}

/* تغيير لون الـ hover */
.sidebar-menu  .nav-treeview > .nav-item > .nav-link:hover {
    background-color: #3d4f63;
    color: #ffffff;
}

/* الأيقونة تبقى متباعدة */
.sidebar-menu .nav-treeview .nav-icon {
    margin-right: 10px;
}

.sidebar-menu .nav-item{
    width: 98%;
}


/* Smooth submenu transition */
.sidebar-menu .nav-treeview {
    display: none;
    transition: all 0.3s ease;
    padding-left: 10px;
}

.sidebar-menu .nav-item.menu-open > .nav-treeview {
    display: block;
}

.sidebar-menu .fas.fa-angle-right {
    transition: transform 0.3s ease;
}

.sidebar-menu .fas.fa-angle-right.rotate {
    transform: rotate(90deg); /* يخلي السهم لتحت */
}


.nav-item.has-treeview.menu-open > a .fa-angle-right {
    transform: rotate(90deg);
    transition: transform 0.3s ease;
}




/* تحسين مظهر عناصر الساب منيو: لون مختلف ومسافة يسار */
.sidebar-menu .app-sidebar .nav-treeview > .nav-item > .nav-link {
  background-color: #2f3e4e;      /* غيّر اللون لو حابب */
  margin-left: .5rem;              /* مسافة يسار */
  border-radius: .25rem;
  margin-bottom: .25rem;           /* مسافة بين العناصر */
  padding-left: 1.25rem;           /* إزاحة للنص والأيقونة */
}
.sidebar-menu .app-sidebar .nav-treeview > .nav-item > .nav-link:hover {
  background-color: #3d4f63;
  color: #fff;
}


/* السهم الأساسي */
.sidebar-menu .app-sidebar .nav-arrow {
  width: 1rem;              /* ثبات عرض العنصر */
  display: inline-block;    /* ياخد مساحة ثابتة */
  text-align: center;
  transition: transform .3s ease;
  vertical-align: middle;   /* يخليه في وسط السطر */
}

/* السهم عند الفتح */
.sidebar-menu .app-sidebar .menu-open > .nav-link .nav-arrow {
  transform: rotate(90deg);
          margin-top:-6px;
}




/* إصلاح مظهر select2 داخل Bootstrap */
.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #ced4da !important;
    border-radius: 0.375rem !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection__rendered {
    line-height: 38px !important;
}

.select2-container--default .select2-selection__arrow {
    height: 38px !important;
}

/* ========================================
   Trip Programs - Edit Form Styling
   ======================================== */

/* Table Container Styling */
#families-table {
    font-size: 13px;
    white-space: nowrap;
    margin-bottom: 0;
}

/* Sticky Table Headers */
#families-table thead {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

#families-table thead th {
    background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
    color: #2c3e50;
    padding: 12px 8px;
    border: 1px solid #dee2e6;
    text-align: center;
    vertical-align: middle;
    font-size: 12px;
    line-height: 1.3;
    white-space: normal;
    min-width: 100px;
}

/* First column (Customer/Group) should be wider */
#families-table thead th:first-child,
#families-table tbody td:first-child {
    min-width: 200px;
}

/* Zebra Striping for Better Row Tracking */
#families-table tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

#families-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Hover Effect on Rows */
#families-table tbody tr:hover {
    background-color: #e3f2fd !important;
    transition: background-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Table Cell Styling */
#families-table tbody td {
    padding: 8px 6px;
    border: 1px solid #dee2e6;
    vertical-align: middle;
}

/* Input Field Styling */
#families-table input[type="text"],
#families-table input[type="number"],
#families-table input[type="time"] {
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.15s ease-in-out;
}

#families-table input[type="text"]:focus,
#families-table input[type="number"]:focus,
#families-table input[type="time"]:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    background-color: #fff;
}

/* Select Dropdown Styling */
#families-table select {
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 13px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.15s ease-in-out;
    background-color: #fff;
}

#families-table select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Customer Select - Wider */
#families-table .customer-select {
    min-width: 180px;
}

/* Remove Button Styling */
#families-table .remove-row {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: bold;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#families-table .remove-row:hover {
    background-color: #c82333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

/* Add Family/Group Button */
#add-family-row {
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

#add-family-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* "or" text styling */
#families-table .muted {
    color: #6c757d;
    font-size: 11px;
    margin: 3px 0;
    text-align: center;
}

/* Section Headers */
.card h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

/* Card Styling */
.card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

/* Scrollable Container Enhancements */
.card > div[style*="overflow-x"] {
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: #fff;
    position: relative;
}

/* Number Input Spinners */
#families-table input[type="number"] {
    -moz-appearance: textfield;
}

#families-table input[type="number"]::-webkit-outer-spin-button,
#families-table input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Placeholder Styling */
#families-table input::placeholder {
    color: #adb5bd;
    opacity: 1;
}

/* Responsive Text */
@media screen and (max-width: 1400px) {
    #families-table {
        font-size: 12px;
    }

    #families-table thead th {
        font-size: 11px;
        padding: 10px 6px;
    }
}




/* Grid Layout for Section 1 */
.grid {
    display: grid;
    gap: 15px;
    margin-bottom: 10px;
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-col-span-2 {
    grid-column: span 2;
}

.grid label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
    font-size: 13px;
}

.grid input,
.grid select,
.grid textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.15s ease-in-out;
}

.grid input:focus,
.grid select:focus,
.grid textarea:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Label Styling */
label.muted {
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
