/* ================================================================== */
/* === WEB PAGE GLOBAL STİLLERİ === */
/* ================================================================== */

/* ===== Reset ve Base Styles ===== */
html,
body,
#__next {
  background: #000;
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

/* ===== Web App Container ===== */
.web-app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: #000;
}

/* ===== Main Content Area ===== */
main {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #000;
  /* Sidebar genişliği kadar padding ekle */
  padding-left: 256px;
  transition: padding-left 0.3s ease-in-out;
}

/* Sidebar kapalıyken padding'i kaldır */
main.sidebar-closed {
  padding-left: 0;
}

/* ===== Calendar View - Main içinde genişlik ayarı ===== */
.calendar-view-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ===== Impersonation Banner ===== */
.impersonation-banner {
  position: sticky;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 999;
  background: #000;
  border-bottom: 1px solid #222;
  padding: 12px 24px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 500;
  color: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* Sidebar genişliği kadar margin ekle */
  margin-left: 256px;
  transition: margin-left 0.3s ease-in-out;
}

.impersonation-banner.sidebar-closed {
  margin-left: 0;
}

.impersonation-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.impersonation-banner-icon {
  color: #9ca3af;
  font-size: 20px;
}

.impersonation-banner-exit-btn {
  background: #111;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.impersonation-banner-exit-btn:hover {
  background: #181818;
}

.impersonation-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  padding: 18px;
}

.impersonation-popup-card {
  width: 100%;
  max-width: 420px;
  background: #131316;
  border: 1px solid #25252b;
  border-radius: 16px;
  padding: 16px;
  color: #e5e7eb;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.4);
}

.impersonation-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.impersonation-popup-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.impersonation-popup-label {
  font-size: 12px;
  color: #9ca3af;
  letter-spacing: 0.2px;
}

.impersonation-popup-name {
  font-size: 16px;
  font-weight: 800;
}

.impersonation-popup-email {
  margin-top: 10px;
  font-size: 13px;
  color: #9ca3af;
}

.impersonation-banner .impersonation-popup-email {
  margin-top: 4px;
}

.impersonation-popup-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.impersonation-popup-btn {
  background: #ffffff;
  color: #0a0a0f;
  border: 1px solid #3b3b40;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ===== Loading Screen ===== */
.loading-screen {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-screen-content {
  text-align: center;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: white;
  font-size: 18px;
  font-weight: 600;
}

/* ===== Material Icons Support ===== */
.material-icons {
  font-family: 'Material Icons';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

.qc-tab {
  width: 100%;
}

/* ===== Utility Classes ===== */
.d-flex {
  display: flex;
}

.align-items-center {
  align-items: center;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-between {
  justify-content: space-between;
}

.flex-grow-1 {
  flex-grow: 1;
}

.ms-auto {
  margin-left: auto;
}

.overflow-hidden {
  overflow: hidden;
}

/* ===== Responsive Breakpoints ===== */
@media (max-width: 768px) {
  main {
    padding-left: 0 !important;
  }

  .impersonation-banner {
    margin-left: 0 !important;
  }
}

/* ===== Print Styles ===== */
@media print {
  .toolbar,
  .sidebar,
  .impersonation-banner {
    display: none;
  }

  .calendar-view {
    border: none;
    box-shadow: none;
  }

  main {
    padding-left: 0 !important;
  }
}

/* ===== Focus Styles ===== */
*:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
}

/* ===== Selection Styles ===== */
::selection {
  background: #e8f0fe;
  color: #1967d2;
}

/* ===== Scrollbar Styles (Global) ===== */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f3f4;
}

::-webkit-scrollbar-thumb {
  background: #dadce0;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #bdc1c6;
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: #dadce0 #f1f3f4;
}
