/* ================================================================== */
/* === SIDEBAR STYLES (Desktop & Mobile) === */
/* ================================================================== */

/* ================= Base Sidebar ================= */
.sidebar {
  position: fixed;
  top: 64px;
  left: 0; /* Her zaman solda sabit */
  width: 256px;
  height: calc(100vh - 64px);
  background-color: #000;
  color: #fff;
  border-right: 1px solid #222;
  transform: translateX(0); /* Açık durum */
  transition: transform 0.3s ease-in-out;
  z-index: 100;
  overflow: hidden;
  font-family: 'Roboto', 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.sidebar.sidebar-closed {
  transform: translateX(-256px); /* Sola kaydır */
}

/* ================= Scrollable Content Area ================= */
.sidebar-scrollable-content {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
}

.sidebar-scrollable-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scrollable-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-scrollable-content::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 10px;
  transition: background 0.2s ease;
}

.sidebar-scrollable-content::-webkit-scrollbar-thumb:hover {
  background: #bdc1c6;
}

/* ================= Create Button Section ================= */
.sidebar-create-button-container {
  padding: 16px;
  flex-shrink: 0;
}

.create-button {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px 0 16px;
  height: 56px;
  width: 100%;
  background-color: #111;
  border: none;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  box-shadow: none;
  transition: box-shadow 0.2s, background-color 0.2s;
}

.create-button:hover {
  box-shadow: none;
  background-color: #181818;
}

.create-button-icon {
  font-size: 24px;
  color: #fff;
}

.create-button-label {
  flex-grow: 1;
  text-align: left;
}

.create-button-dropdown-arrow {
  font-size: 18px;
  margin-left: auto;
  color: #5f6368;
}

/* ================= Mini Calendar ================= */
.minicalendar {
  padding: 8px 16px 16px;
}

.minicalendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  margin-bottom: 16px;
}

.minicalendar-nav {
  display: flex;
  gap: 4px;
}

.minicalendar-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background-color 0.2s;
  width: 32px;
  height: 32px;
}

.minicalendar-nav-btn:hover {
  background-color: #111;
}

.minicalendar-nav .material-icons {
  font-size: 20px;
  color: #e5e7eb;
}

.minicalendar-weekdays-header {
  font-size: 10px;
  color: #e5e7eb;
  margin-bottom: 8px;
}

.minicalendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.minicalendar-weekday {
  text-align: center;
  padding: 4px;
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
}

.minicalendar-day-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 400;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s;
  color: #3c4043;
  background-color: transparent;
  border: none;
  outline: none;
}

.minicalendar-day-cell.today {
  background-color: #1a73e8;
  color: #fff;
  font-weight: 500;
}

.minicalendar-day-cell.other-month {
  color: #a2a4a7;
}

.minicalendar-day-cell:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.minicalendar-day-cell:disabled:hover {
  background-color: transparent;
}

.minicalendar-day-cell:not(.today):hover {
  background-color: #f1f3f4;
}

.minicalendar-day-cell:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

/* ================= Search & Section Titles ================= */
.sidebar-section-title {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #3c4043;
}

.sidebar-search-container {
  padding: 0 16px 16px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  background-color: #f8f9fa;
  transition: border-color 0.2s, background-color 0.2s;
}

.search-input:focus {
  border-color: #1a73e8;
  background-color: #fff;
}

.search-input-icon {
  position: absolute;
  left: 24px;
  top: 8px;
  font-size: 20px;
  color: #5f6368;
  pointer-events: none;
}

/* ================= Collapsible Sections ================= */
.sidebar-collapsible-section {
  padding: 4px 8px;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
  border-radius: 8px;
  background-color: transparent;
  border: none;
  text-align: left;
  transition: background-color 0.15s ease-in-out;
}

.collapsible-header:hover {
  background-color: #f1f3f4;
}

.collapsible-header-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 56px;
  gap: 8px;
}

.collapsible-header-icons .material-icons {
  font-size: 20px;
  color: #5f6368;
}

.collapsible-header-icons .add-icon {
  cursor: pointer;
  transition: color 0.2s;
}

.collapsible-header-icons .add-icon:hover {
  color: #3c4043;
}

.collapsible-content {
  font-size: 14px;
  color: #3c4043;
}

/* Specific content padding */
.booking-content {
  padding: 8px 0 0 8px;
}

.time-insights-content {
  padding: 4px 8px 12px 16px;
}

.calendar-list {
  padding-left: 8px;
}

.collapsible-content-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: background-color 0.2s;
}

.collapsible-content-item:hover {
  background-color: #f1f3f4;
}

.collapsible-content-item .material-icons {
  font-size: 20px;
  color: #5f6368;
}

.new-badge {
  background-color: #1a73e8;
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin-left: auto;
}

/* ================= Time Insights Specific ================= */
.time-insights-date-range {
  font-size: 11px;
  color: #70757a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.time-insights-summary {
  font-size: 13px;
  color: #3c4043;
  margin-top: 4px;
}

.more-insights-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #fff;
  border: 1px solid #dadce0;
  color: #1a73e8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 18px;
  margin-top: 12px;
  transition: background-color 0.2s;
}

.more-insights-button:hover {
  background-color: #f8f9fa;
}

.more-insights-button .material-icons {
  font-size: 18px;
}

/* ================= Calendar Lists (My/Other Calendars) ================= */
.calendar-item {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  min-height: 40px;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s;
}

.calendar-item:hover {
  background-color: #f1f3f4;
}

.calendar-item span {
  font-size: 14px;
  color: #3c4043;
  flex-grow: 1;
}

/* Custom Checkbox from CalendarCheckbox component */
.calendar-checkbox-wrapper {
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  transition: transform 0.2s;
}

.calendar-item:hover .calendar-checkbox-wrapper {
  transform: scale(1.1);
}

.calendar-checkbox-wrapper .check-icon {
  font-size: 14px;
  color: #fff;
}

/* ================= Role Display (Footer) ================= */
.sidebar-role-display {
  flex-shrink: 0;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Google Sans', Roboto, Arial, sans-serif;
  background-color: #f8f9fa;
  border-top: 1px solid #dadce0;
  color: #3c4043;
}

.sidebar-role-display .role-icon {
  font-size: 20px;
  line-height: 1;
  color: #5f6368;
}

.sidebar-role-display .role-name {
  font-size: 14px;
  font-weight: 500;
}

/* ================= Dropdown Menu ================= */
.dropdown-custom {
  position: relative;
  display: inline-block;
  width: 100%;
}

.dropdown-menu-custom {
  position: absolute;
  top: 100%;
  left: -195px;
  right: 0;
  background: black;
  border: 1px solid #111;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  width: 100%;
  max-height: 60vh;
  overflow-y: auto;
  margin-top: 4px;
  padding: 8px 0;
}

.dropdown-item-custom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: white;
  font-size: 14px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s;
}

.dropdown-item-custom:hover {
  background: #f1f3f4;
}

.dropdown-item-custom i,
.dropdown-item-custom .material-icons {
  width: 20px;
  text-align: center;
  font-size: 20px;
  color: #5f6368;
}

/* ================= Mobile Styles ================= */
@media screen and (max-width: 768px) {
  .sidebar {
    top: 56px; /* Mobile header height */
    height: calc(100vh - 56px);
    width: 240px;
    font-size: 12px;
  }

  .sidebar-create-button-container {
    padding: 12px;
  }

  .create-button {
    height: 48px;
    padding: 0 16px 0 12px;
    gap: 12px;
    font-size: 13px;
  }

  .create-button-icon {
    font-size: 20px;
  }

  .create-button-dropdown-arrow {
    font-size: 16px;
  }

  .minicalendar {
    padding: 8px 12px;
  }

  .minicalendar-header {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .minicalendar-nav .material-icons {
    font-size: 18px;
  }

  .minicalendar-weekday {
    font-size: 10px;
    padding: 2px;
  }

  .minicalendar-day-cell {
    font-size: 11px;
  }

  .sidebar-section-title {
    padding: 8px 12px;
    font-size: 12px;
  }

  .sidebar-search-container {
    padding: 0 12px 12px;
  }

  .search-input {
    padding: 6px 10px 6px 32px;
    font-size: 13px;
  }

  .search-input-icon {
    left: 20px;
    top: 6px;
    font-size: 18px;
  }

  .collapsible-header {
    padding: 6px;
    font-size: 13px;
  }

  .collapsible-header-icons .material-icons {
    font-size: 18px;
  }

  .collapsible-content {
    font-size: 12px;
  }

  .collapsible-content-item {
    padding: 6px;
    gap: 6px;
  }

  .collapsible-content-item .material-icons {
    font-size: 18px;
  }

  .calendar-item {
    padding: 6px;
    min-height: 36px;
  }

  .calendar-item span {
    font-size: 13px;
  }

  .new-badge {
    font-size: 10px;
    padding: 1px 6px;
  }

  .sidebar-role-display {
    padding: 12px 16px;
    gap: 8px;
  }

  .sidebar-role-display .role-icon {
    font-size: 18px;
  }

  .sidebar-role-display .role-name {
    font-size: 12px;
  }

  .time-insights-date-range {
    font-size: 10px;
  }

  .time-insights-summary {
    font-size: 12px;
  }

  .more-insights-button {
    font-size: 12px;
    padding: 6px 12px;
  }

  .more-insights-button .material-icons {
    font-size: 16px;
  }
}

/* ================= Animation ================= */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* ================= Utility Classes ================= */
.sidebar.sidebar-hidden {
  transform: translateX(-100%);
}

.sidebar.sidebar-visible {
  transform: translateX(0);
}
