/* Tour View Layout */

.tour-summary {
  margin: 18px 0;
  background: #fff;
  border: 1px solid #dfe5eb;
  border-radius: 8px;
  overflow: hidden;
}

.tour-section {
  padding: 18px 22px;
  border-bottom: 1px solid #e5e9ed;
}

.tour-section:last-child {
  border-bottom: 0;
}

.tour-section h3 {
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #3b7ea5;
  font-size: 14px;
  font-weight: 700;
  color: #24465b;
}

.tour-grid {
  display: grid;
  gap: 16px 24px;
}

.tour-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tour-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tour-room-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 18px;
}

.tour-grid > div {
  min-width: 0;
}

.tour-grid span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: #6b7785;
}

.tour-grid strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #202b33;
  word-break: break-word;
}

.tour-total {
  padding-left: 14px;
  border-left: 2px solid #3b7ea5;
}

.tour-total strong {
  font-size: 17px;
}

@media (max-width: 900px) {
  .tour-grid-4,
  .tour-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tour-room-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Tur Talebi ekranında Redmine'ın eski detay alanlarını gizle */
body.tour-talebi-view .issue .attributes {
  display: none !important;
}
/* ===== Tour View v1.1 - Görsel iyileştirmeler ===== */

body.tour-talebi-view .tour-summary {
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

body.tour-talebi-view .tour-section {
  padding: 0;
  border-bottom: 1px solid #e3e9ef;
}

body.tour-talebi-view .tour-section:last-child {
  border-bottom: 0;
}

body.tour-talebi-view .tour-section h3 {
  margin: 0 0 14px 0;
  padding: 10px 16px;
  background: #f3f7fb;
  border-bottom: 1px solid #d8e4ef;
  font-size: 14px;
  font-weight: 700;
  color: #173b63;
}

body.tour-talebi-view .tour-section .tour-grid,
body.tour-talebi-view .tour-description {
  padding: 0 16px 14px 16px;
}

body.tour-talebi-view .tour-grid > div > span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  color: #66788a;
}

body.tour-talebi-view .tour-grid > div > strong {
  font-size: 14px;
  color: #14283d;
}

body.tour-talebi-view .tour-total {
  padding-left: 12px;
  border-left: 3px solid #2f78b7;
  background: #f5f9fd;
  border-radius: 3px;
}

body.tour-talebi-view .tour-total strong {
  font-size: 18px !important;
  color: #145a96 !important;
}

/* ===== TUR TALEBI - KOMPAKT EKRAN TASARIMI ===== */
@media screen {
  body.tour-talebi-view .tour-summary {
    margin: 12px 0;
    border: 1px solid #dce2e8;
    border-radius: 7px;
    background: #fff;
  }

  body.tour-talebi-view .tour-section {
    padding: 12px 18px;
    border-bottom: 1px solid #e8ebef;
  }

  body.tour-talebi-view .tour-section h3 {
    margin: 0 0 10px;
    padding: 0 0 7px;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #dce2e8;
    color: #33465a;
    font-size: 12px;
    font-weight: 700;
  }

  body.tour-talebi-view .tour-grid,
  body.tour-talebi-view .tour-grid-4,
  body.tour-talebi-view .tour-grid-3,
  body.tour-talebi-view .tour-room-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
    margin-top: 0;
    padding: 0;
  }

  body.tour-talebi-view .tour-room-grid {
    margin-top: 8px;
  }

  body.tour-talebi-view .tour-grid > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
  }

  body.tour-talebi-view .tour-grid > div > span {
    display: inline;
    flex: 0 0 125px;
    margin: 0;
    font-size: 12px;
    color: #687585;
  }

  body.tour-talebi-view .tour-grid > div > strong {
    display: inline;
    font-size: 13px;
    font-weight: 600;
    color: #263442;
  }

  body.tour-talebi-view .tour-total {
    padding: 0;
    border: 0;
  }

  body.tour-talebi-view .tour-total strong {
    font-size: 13px;
  }

  body.tour-talebi-view .tour-description {
    padding: 0;
    font-size: 13px;
  }

  @media (max-width: 700px) {
    body.tour-talebi-view .tour-grid,
    body.tour-talebi-view .tour-grid-4,
    body.tour-talebi-view .tour-grid-3,
    body.tour-talebi-view .tour-room-grid {
      grid-template-columns: 1fr;
    }
  }
}

/* ===== TUR TALEBI EXCEL TABLOSU ===== */
@media screen {
  body.tour-talebi-view .tour-summary.tour-excel {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: #fff;
  }

  body.tour-talebi-view .tour-excel-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin: 0;
    background: #fff;
    font-size: 12px;
  }

  body.tour-talebi-view .tour-excel-table th,
  body.tour-talebi-view .tour-excel-table td {
    border: 1px solid #d5dbe1;
    padding: 5px 8px;
    height: 20px;
    line-height: 1.35;
    vertical-align: middle;
    text-align: left;
    background: #fff;
    color: #263442;
    overflow-wrap: anywhere;
  }

  body.tour-talebi-view .tour-excel-table .tour-excel-heading th {
    background: #f0f3f6;
    color: #263e55;
    font-size: 12px;
    font-weight: 700;
    padding: 8px;
  }

  body.tour-talebi-view .tour-excel-table .tour-label {
    color: #536476;
    font-weight: 400;
  }

  body.tour-talebi-view .tour-excel-table .tour-value {
    color: #172c40;
    font-weight: 600;
  }

  body.tour-talebi-view .tour-excel-table .tour-value p {
    margin: 0;
  }
}

/* TUR TALEBI - BEYAZ IS KARTI */
@media screen {
  body.tour-talebi-view .issue.details {
    background: #fff !important;
  }
}

/* ===== TUR TALEBI A4 YAZDIRMA ===== */
@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body.tour-talebi-view,
  body.tour-talebi-view #main,
  body.tour-talebi-view #content,
  body.tour-talebi-view .issue.details {
    background: #fff !important;
  }

  body.tour-talebi-view #header,
  body.tour-talebi-view #top-menu,
  body.tour-talebi-view #main-menu,
  body.tour-talebi-view #sidebar,
  body.tour-talebi-view #footer,
  body.tour-talebi-view .contextual,
  body.tour-talebi-view .issue.details > .attributes,
  body.tour-talebi-view .issue.details > .description,
  body.tour-talebi-view .issue.details > .splitcontent,
  body.tour-talebi-view .issue.details > .splitcontentleft,
  body.tour-talebi-view .issue.details > .splitcontentright {
    display: none !important;
  }

  body.tour-talebi-view .tour-summary.tour-excel {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 6mm 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: #fff !important;
  }

  body.tour-talebi-view .tour-excel-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 9pt !important;
    background: #fff !important;
  }

  body.tour-talebi-view .tour-excel-table th,
  body.tour-talebi-view .tour-excel-table td {
    display: table-cell !important;
    border: 1px solid #888 !important;
    padding: 5px 7px !important;
    text-align: left !important;
    vertical-align: middle !important;
    background: #fff !important;
    color: #222 !important;
    overflow-wrap: anywhere !important;
  }

  body.tour-talebi-view .tour-excel-table .tour-excel-heading th {
    background: #eee !important;
    font-weight: bold !important;
    color: #222 !important;
  }

  body.tour-talebi-view .tour-excel-table tr {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  body.tour-talebi-view #issue_tree,
  body.tour-talebi-view #relations,
  body.tour-talebi-view #history {
    background: #fff !important;
    break-inside: auto !important;
  }
}

/* A4 baski - tekrarlanan Redmine alanlarini gizle */
@media print {
  body.tour-talebi-view .issue.details > .attributes,
  body.tour-talebi-view .issue.details > .description,
  body.tour-talebi-view .issue.details > .avatar-with-child,
  body.tour-talebi-view .issue.details > .author,
  body.tour-talebi-view .issue.details > .reaction,
  body.tour-talebi-view .issue.details > [data-controller="sticky-issue-header"] {
    display: none !important;
  }

  body.tour-talebi-view .issue.details {
    background: #fff !important;
    background-color: #fff !important;
  }
}

/* OTOBUS PLANI - BEYAZ ANA BILGI ALANI */
@media screen {
  body.bus-plan-view .issue.details {
    background: #FFFFFF !important;
  }
}
/* OTOBUS PLANI - TEKRAR EDEN TUR ALANLARINI GIZLE */
@media screen {
  body.bus-plan-view .issue.details .attributes .cf_2,
  body.bus-plan-view .issue.details .attributes .cf_5,
  body.bus-plan-view .issue.details .attributes .cf_10,
  body.bus-plan-view .issue.details .attributes .cf_17,
  body.bus-plan-view .issue.details .attributes .cf_18,
  body.bus-plan-view .issue.details .attributes .cf_31,
  body.bus-plan-view .issue.details .attributes .cf_32 {
    display: none !important;
  }
}
/* OTOBUS PLANI - BASLANGIC VE BITIS TARIHLERINI GIZLE */
@media screen {
  body.bus-plan-view .issue.details .attributes .start-date,
  body.bus-plan-view .issue.details .attributes .due-date {
    display: none !important;
  }
}
/* PROJELER SAYFASI - MODERN KART TASARIMI */
@media screen {

  /* Eski sutun duzenini kaldir */
  #projects-index {
    column-count: initial !important;
    column-width: auto !important;
    -webkit-column-count: initial !important;
    -webkit-column-width: auto !important;
    -moz-column-count: initial !important;
    -moz-column-width: auto !important;
  }

  /* Esit boyutlu kartlar */
  #projects-index > ul.projects {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 0;
    list-style: none;
  }

  #projects-index ul.projects li.root {
    min-height: 175px;
    margin: 0;
    padding: 22px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-top: 5px solid #2563EB;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
  }

  /* Fare uzerine gelince */
  #projects-index ul.projects li.root:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
  }


  /* Proje basliklari */
  #projects-index ul.projects div.root a.project {
    font-size: 16px;
    font-weight: 600;
  }

  /* Tablet */
  @media (max-width: 1100px) {
    #projects-index > ul.projects {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  /* Telefon */
  @media (max-width: 650px) {
    #projects-index > ul.projects {
      grid-template-columns: 1fr;
    }
  }
}
/* PROJE KARTLARI - IKONLAR */
#projects-index > ul.projects > li.root div.root > a.project::before {
  display: inline-block;
  margin-right: 10px;
  font-size: 21px;
  vertical-align: middle;
}

/* PROJE KARTLARI - SABIT RENK VE IKON */

/* Genel Is Takip */
#projects-index > ul.projects > li.root:has(a.project[href="/projects/genel-is-takip"]) {
  border-top-color: #2563EB;
}
#projects-index li.root:has(a.project[href="/projects/genel-is-takip"]) div.root > a.project::before {
  content: "📋";
}

/* Otobus Planlama */
#projects-index > ul.projects > li.root:has(a.project[href="/projects/otobues-planlama-ve-takip"]) {
  border-top-color: #0D9488;
}
#projects-index li.root:has(a.project[href="/projects/otobues-planlama-ve-takip"]) div.root > a.project::before {
  content: "🚌";
}

/* Planlama Birimi */
#projects-index > ul.projects > li.root:has(a.project[href="/projects/planlama-birimi"]) {
  border-top-color: #64748B;
}
#projects-index li.root:has(a.project[href="/projects/planlama-birimi"]) div.root > a.project::before {
  content: "📅";
}

/* Tur Planlama */
#projects-index > ul.projects > li.root:has(a.project[href="/projects/tur-planlama-ve-takip"]) {
  border-top-color: #EA580C;
}
#projects-index li.root:has(a.project[href="/projects/tur-planlama-ve-takip"]) div.root > a.project::before {
  content: "🗺️";
}
/* OTOBUS PLANLAMA - IKON DUZELTMESI */
#projects-index > ul.projects > li.root:has(a.project[href="/projects/otobues-planlama-ve-takip"]) div.root > a.project::before {
  content: "🚌" !important;
  display: inline-block !important;
  margin-right: 10px;
  font-size: 21px;
}


/* Tur Talebi - ustteki tekrar eden aciklamayi gizle */
@media screen {
  body.tour-talebi-view .issue.details > .description {
    display: none !important;
  }
}
