/* Türksat DVB-I Servis Listesi Editörü
 * Kurumsal palet (PLACEHOLDER — Türksat kurumsal kimlik kılavuzu gelince güncellenecek).
 * Not: .btn-orange / .btn-outline-blue sınıf ADLARI upstream JS/HTML uyumluluğu
 * için korunmuştur; renkleri Türksat paletine bağlanmıştır.
 */
:root {
  --turksat-navy: #00205b;
  --turksat-blue: #0055a5;
  --turksat-blue-light: #2d7dd2;
  --turksat-sky: #7eb3e8;
  --turksat-grey: #848484;
  --turksat-bg: #f4f7fb;
}

html {
  height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--turksat-bg);
}

.main {
  flex: 1;
}

.navbar.bg-dark {
  background-color: var(--turksat-navy) !important;
}

.navbar .lang-switch .btn {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
  padding: 0.1rem 0.5rem;
  margin-left: 0.25rem;
}

.navbar .lang-switch .btn.active,
.navbar .lang-switch .btn:hover {
  background-color: var(--turksat-blue);
  border-color: var(--turksat-blue);
}

.service {
  border: 1px solid var(--turksat-grey);
  border-radius: 8px;
  margin-bottom: 2em;
  padding: 0.5em;
  box-shadow: 0px 0px 15px rgba(0, 32, 91, 0.08);
}

.service .serviceinstance {
  border-top: 1px solid var(--turksat-grey);
  margin: 1em 0em 0em 0em;
  padding: 1em 0.5em;
}

#saved_servicelists .icon {
  width: 26px;
  height: 26px;
}

#saved_servicelists .btn:focus,
#saved_servicelists .btn.focus {
  box-shadow: none;
}

.btn-outline-blue {
  border: 1px solid var(--turksat-blue);
  border-radius: 0px;
  color: var(--turksat-blue);
  -webkit-transition: all 0.3s;
  transition: all 0.3s;
}

.btn-outline-blue:hover {
  background-color: var(--turksat-blue);
  color: #fff;
}

.card {
  box-shadow: 0px 0px 35px rgba(0, 32, 91, 0.08);
}

.btn-orange {
  background-color: var(--turksat-blue);
  border-color: var(--turksat-blue);
  color: #fff;
}

.btn-orange:hover {
  background-color: var(--turksat-blue-light);
  color: #fff;
}

.footer {
  min-height: 15vh;
  background-color: var(--turksat-navy);
  color: #fff;
  padding: 1rem 0;
}

.footer a {
  color: var(--turksat-sky);
}

/* ---------- Usta-detay kanal yönetimi (turksat-ui.js) ---------- */

/* Kanal form kartları DOM'da kalır (veri modeli) ama yalnız düzenlenen görünür */
#services .service {
  display: none;
}

#services .service.editing {
  display: block;
  border: none;
  box-shadow: none;
  margin-bottom: 0;
  padding: 0;
}

.list-info-header {
  color: var(--turksat-navy);
  font-weight: 600;
  text-decoration: none;
  background-color: var(--turksat-bg);
  border-radius: 0.25rem 0.25rem 0 0;
}

.list-info-header:hover {
  text-decoration: none;
  background-color: #e9eff7;
}

.channel-table-wrap {
  max-height: 60vh;
  overflow-y: auto;
}

.channel-table thead th {
  position: sticky;
  top: 0;
  background-color: var(--turksat-navy);
  color: #fff;
  border: none;
  font-weight: 600;
  z-index: 1;
}

.channel-table thead th.sortable {
  cursor: pointer;
  user-select: none;
}

.channel-table thead th.sortable:hover {
  background-color: var(--turksat-blue);
}

.channel-table td {
  vertical-align: middle;
}

.channel-table .col-lcn {
  width: 4.5rem;
}

.channel-table .col-actions {
  width: 9rem;
}

.channel-table tr.editing-row td {
  background-color: #e3edf9;
}

.ch-name {
  font-weight: 600;
  color: var(--turksat-navy);
}

.ch-logo {
  height: 24px;
  max-width: 44px;
  object-fit: contain;
  margin-right: 0.5rem;
  vertical-align: middle;
  background: #fff;
  border-radius: 3px;
  padding: 1px;
}

.badge-lcn {
  background-color: var(--turksat-navy);
  color: #fff;
  min-width: 2.4rem;
  font-size: 0.8rem;
}

.badge-tuning {
  background-color: var(--turksat-bg);
  color: var(--turksat-blue);
  border: 1px solid var(--turksat-sky);
  font-weight: 500;
}

.badge-multi {
  background-color: var(--turksat-blue);
  color: #fff;
}

.btn-outline-danger {
  border: 1px solid #b02a37;
  color: #b02a37;
  border-radius: 0;
}

.btn-outline-danger:hover {
  background-color: #b02a37;
  color: #fff;
}

.service-detail {
  border-color: var(--turksat-blue) !important;
}

.service-detail-header {
  background-color: var(--turksat-bg);
  border-bottom: 1px solid var(--turksat-sky);
  color: var(--turksat-navy);
}

.pagination .page-item.active .page-link {
  background-color: var(--turksat-blue);
  border-color: var(--turksat-blue);
}

.pagination .page-link {
  color: var(--turksat-blue);
}

/* ---------- Kimlik doğrulama (giriş ekranı, rol gizleme) ---------- */

/* viewer rolünde yazma/yapılandırma kontrolleri gizlenir */
body.role-viewer .admin-only {
  display: none !important;
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 32, 91, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.login-card {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  width: 360px;
  max-width: 92vw;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.login-card-wide {
  width: 560px;
  text-align: left;
}

.login-card h5 {
  color: var(--turksat-navy);
  margin-bottom: 1rem;
}

/* ---------- (i) yardım balonları ---------- */

.info-tip {
  display: inline-block;
  position: relative;
  margin-left: 0.3rem;
  color: var(--turksat-blue);
  cursor: help;
  font-style: normal;
  font-size: 0.85em;
  line-height: 1;
  user-select: none;
}

.info-tip:hover,
.info-tip:focus {
  color: var(--turksat-navy);
  outline: none;
}

.info-tip .info-tip-text {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 135%;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background-color: var(--turksat-navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.35;
  padding: 0.45rem 0.6rem;
  border-radius: 0.3rem;
  box-shadow: 0 2px 10px rgba(0, 32, 91, 0.35);
  z-index: 50;
  transition: opacity 0.15s;
  pointer-events: none;
  white-space: normal;
  text-align: left;
}

.info-tip .info-tip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--turksat-navy);
}

.info-tip:hover .info-tip-text,
.info-tip:focus .info-tip-text {
  visibility: visible;
  opacity: 1;
}

/* Balonun kart kenarından taşmaması için sola hizalı varyant gerektiğinde */
.service .info-tip .info-tip-text,
.list-info .info-tip .info-tip-text {
  left: 0;
  transform: none;
}

.service .info-tip .info-tip-text::after,
.list-info .info-tip .info-tip-text::after {
  left: 12px;
  margin-left: 0;
}
