/* ==========================================================================
   MAKASVAKTI NATIVE MOBILE APP STYLES (iOS / Android Feel)
   ========================================================================== */

/* 1. Device Safe Areas & Base Mobile Setup */
@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 16px)) !important;
    background-color: #f8fafc !important;
    -webkit-tap-highlight-color: transparent;
  }

  .app-sidebar {
    display: none !important;
  }

  .app-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .app-topbar {
    display: none !important;
  }

  .app-main {
    padding: 12px 14px 24px 14px !important;
  }

  /* Desktop elements to hide on mobile */
  .desktop-only-table {
    display: none !important;
  }

  .mobile-only-feed {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
  }
}

@media (min-width: 768px) {
  .mobile-bottom-nav,
  .mobile-app-header,
  .mobile-only-feed {
    display: none !important;
  }
}

/* 2. Mobile App Header */
.mobile-app-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.mobile-app-header .salon-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-app-header .salon-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.mobile-app-header .salon-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.mobile-app-header .salon-subtitle {
  font-size: 0.72rem;
  color: #94a3b8;
}

.mobile-app-header .header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-app-header .btn-header-action {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 25em, 0.1);
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  text-decoration: none;
}

/* 3. Horizontal Date Scroll Strip */
.date-scroll-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.date-scroll-strip::-webkit-scrollbar {
  display: none;
}

.date-pill {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 8px 10px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  text-align: center;
  text-decoration: none;
  color: #334155;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.date-pill .day-name {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #64748b;
  display: block;
}

.date-pill .day-number {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
  display: block;
}

.date-pill.active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.date-pill.active .day-name {
  color: #94a3b8;
}

/* 4. Native Mobile Appointment Cards */
.mobile-only-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 6px 0 24px 0;
}

.mobile-apt-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  margin-bottom: 2px;
}

.mobile-apt-card:active {
  transform: scale(0.985);
}

.mobile-apt-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-top-left-radius: 18px;
  border-bottom-left-radius: 18px;
}

.mobile-apt-card.pending::before,
.mobile-apt-card.status-pending::before { background: #f59e0b; }
.mobile-apt-card.confirmed::before,
.mobile-apt-card.status-confirmed::before { background: #3b82f6; }
.mobile-apt-card.completed::before,
.mobile-apt-card.status-completed::before { background: #10b981; }
.mobile-apt-card.cancelled::before,
.mobile-apt-card.status-cancelled::before { background: #ef4444; }

.mobile-apt-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.mobile-apt-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 10px;
  min-width: 65px;
  text-align: center;
  flex-shrink: 0;
}

.mobile-apt-time .start {
  font-size: 1.05rem;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.25;
}

.mobile-apt-time .end {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 3px;
  line-height: 1.2;
}

.mobile-apt-customer {
  flex: 1;
  min-width: 0;
  padding: 0 4px;
}

.mobile-apt-customer .name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-apt-customer .phone {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 5px;
}

.mobile-apt-status {
  flex-shrink: 0;
  text-align: right;
}

.mobile-apt-card-body {
  margin-bottom: 14px;
}

.mobile-apt-card-body .badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.35;
}

.mobile-apt-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: #10b981;
  line-height: 1.25;
}

.mobile-apt-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.mobile-apt-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 4px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #334155;
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-apt-action-btn i {
  font-size: 1.15rem;
  line-height: 1;
}

.mobile-apt-action-btn:hover,
.mobile-apt-action-btn:active {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}

/* 5. Mobile Bottom Tab Bar (iOS / Android Tab Bar) */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1040;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 600;
  gap: 2px;
  height: 100%;
  transition: color 0.15s ease;
}

.mobile-nav-item i {
  font-size: 1.35rem;
  line-height: 1;
}

.mobile-nav-item.active {
  color: #2563eb;
  font-weight: 700;
}

.mobile-nav-item.active i {
  transform: translateY(-1px);
}

/* FAB Center Add Button */
.mobile-nav-fab {
  position: relative;
  top: -14px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.35);
  border: 3px solid #ffffff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-nav-fab:active {
  transform: scale(0.92);
}

/* 6. Native Bottom Action Sheet (Alttan Açılan İşlem Menüsü) */
.mobile-sheet-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1080;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-sheet-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.mobile-bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 12px 18px calc(24px + env(safe-area-inset-bottom, 16px)) 18px;
  z-index: 1090;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15);
  max-height: 85vh;
  overflow-y: auto;
}

.mobile-bottom-sheet.show {
  transform: translateY(0);
}

.mobile-bottom-sheet .sheet-handle {
  width: 40px;
  height: 5px;
  background: #cbd5e1;
  border-radius: 10px;
  margin: 0 auto 16px auto;
}

.sheet-action-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: #f8fafc;
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  border: 1px solid #f1f5f9;
  transition: background 0.15s ease;
}

.sheet-action-item:active {
  background: #e2e8f0;
}

.sheet-action-item i {
  font-size: 1.25rem;
}

.sheet-action-item.danger {
  color: #ef4444;
  background: #fef2f2;
}
