/**
 * Main Layout Styles
 * Extracted from views/layouts/main.php (optimization 2026-02)
 *
 * Sections:
 * - Table styling
 * - Navigation adjustments
 * - FullCalendar responsive design
 * - jQuery UI Autocomplete
 * - Modal styling
 * - Calendar helpers
 * - Sticky header
 * - Kartik GridView overrides
 * - Info badges
 * - DetailView tables
 * - Loading overlay
 */

/* Table Styling */
.table {
  color: #73879C;
}

.top_nav .navbar-right {
  margin: 0px;
}

/* FullCalendar Responsive Design */
@media (max-width: 768px) {
  .fc-toolbar {
    flex-wrap: wrap;
  }
  .fc-toolbar > div {
    float: center !important;
    width: 100%;
    margin: 4px 0;
  }
  .fc-center {
    order: 1;
  }
  .fc-right {
    order: 2;
  }
  .fc-left {
    order: 3;
  }
}

/* jQuery UI Autocomplete */
.ui-menu .ui-menu-item a {
  font-size: 12px;
}

.ui-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1051 !important;
  float: left;
  display: none;
  min-width: 160px;
  _width: 160px;
  padding: 4px 0;
  margin: 2px 0 0 0;
  list-style: none;
  background-color: #ffffff;
  border-color: #ccc;
  border-color: rgba(0, 0, 0, 0.2);
  border-style: solid;
  border-width: 1px;
  -webkit-border-radius: 2px;
  -moz-border-radius: 2px;
  border-radius: 2px;
  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  -webkit-background-clip: padding-box;
  -moz-background-clip: padding;
  background-clip: padding-box;
  *border-right-width: 2px;
  *border-bottom-width: 2px;
}

.ui-menu-item > a.ui-corner-all {
  display: block;
  padding: 3px 15px;
  clear: both;
  font-weight: normal;
  line-height: 18px;
  color: #555555;
  white-space: nowrap;
  text-decoration: none;
}

.ui-state-hover, .ui-state-active {
  color: #ffffff;
  text-decoration: none;
  background-color: #0088cc;
  border-radius: 0px;
  -webkit-border-radius: 0px;
  -moz-border-radius: 0px;
  background-image: none;
}

/* Modal Styling */
#modalIns {
  width: 500px;
}

/* Calendar Helpers */
.today {
  font-weight: bold;
  text-decoration: underline;
}

.fc-day-sat, .fc-day-sun, .fc-slot-sat, .fc-slot-sun {
  background-color: #f2dede;
}

/* Table Padding Override */
.table > thead > tr, .table > tbody > tr, .table > tfoot > tr {
}

.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th,
.table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
  padding: 12px 8px;
  vertical-align: middle;
}

/* Sticky Header Bar */
#sticky-bar {
  background: #EDEDED;
  padding: 5px 0px;
}

/* Kartik GridView */
.kv-grouped-row {
  background: none !important;
}

/* Info Badge Positioning */
.info-container {
  position: relative;
  margin: 0.5rem !important;
}

.info-badge {
  position: absolute;
  top: -5px;
  right: -5px;
}

/* DetailView Tables */
.detail-view {
  table-layout: fixed;
  width: 100%;
}

.detail-view th {
  width: 30%;
  word-wrap: break-word;
  white-space: normal;
}

.detail-view td {
  width: 70%;
}

.detail-view th {
  background-color: var(--dark);
  color: #fff;
}

/* Loading Overlay for AJAX Operations */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.loading-overlay.active {
  display: flex;
}

.loading-spinner {
  background: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.loading-spinner .spinner-border {
  width: 3rem;
  height: 3rem;
}
