/* css/modal-wide.css — Кең модаль терезелер мен фото-хроника

   Жеке даму картасы, мониторинг сияқты кестелер стандартты
   модальға сыймайды — Modal.open(..., 'wide') арқылы кеңейтіледі. */

/* ── Кең модаль ── */
.modal-box--wide {
  max-width: min(1180px, 96vw) !important;
  width: min(1180px, 96vw) !important;
}

.modal-box--full {
  max-width: 98vw !important;
  width: 98vw !important;
  height: 94vh;
  display: flex;
  flex-direction: column;
}
.modal-box--full .modal-body {
  flex: 1;
  overflow-y: auto;
}

/* Кең режимде дене биіктігі де үлкейеді — скролл азаяды */
.modal-box--wide .modal-body {
  max-height: calc(100vh - 150px);
}

@media (max-width: 900px) {
  .modal-box--wide,
  .modal-box--full {
    max-width: 98vw !important;
    width: 98vw !important;
  }
}

/* ── Жеке даму картасының кестесі ── */
.devcard-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
}
.devcard-table th {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 7px 8px;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  vertical-align: middle;
}
.devcard-table td {
  border: 1px solid var(--border);
  padding: 4px;
  vertical-align: top;
}
.devcard-table .dc-comp {
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 8px;
  width: 132px;
  min-width: 132px;
}
.devcard-table textarea.dev-cell {
  width: 100%;
  min-width: 175px;
  font-size: 11.5px;
  line-height: 1.45;
  resize: vertical;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: border-color .12s, background .12s;
}
.devcard-table textarea.dev-cell:hover:not([readonly]) {
  border-color: var(--border);
  background: #fff;
}
.devcard-table textarea.dev-cell:focus {
  border-color: var(--primary);
  background: #fff;
  outline: none;
}
.devcard-table textarea.dev-cell[readonly] {
  color: var(--text-muted);
  cursor: default;
}

/* ── Топ атауы кестелерде солға тураланады ── */
.group-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.group-name-cell > div {
  text-align: left;
}

/* ── Фото-хроника: YouTube ── */
.media-tile {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  display: block;
}
.media-tile .yt-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 30px;
  text-shadow: 0 2px 10px rgba(0,0,0,.6);
  background: rgba(0,0,0,.22);
  cursor: pointer;
  transition: background .15s;
}
.media-tile .yt-play:hover { background: rgba(0,0,0,.38); }

.media-tile .tile-action {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

/* ── Instagram / Facebook сілтемесі ──
   Олар сайт ішінде ойнамайды (SDK мен авторизация керек),
   сондықтан түсті карточка түрінде көрсетіледі. */
.link-tile { cursor: pointer; }

.link-tile-inner {
  position: absolute;
  inset: 0 0 34px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  font-size: 30px;
  transition: filter .15s;
}
.link-tile:hover .link-tile-inner { filter: brightness(1.12); }

.link-tile-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
}

.link-tile-name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 34px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--border-light);
  font-size: 11px;
  line-height: 1.25;
  color: var(--text);
  overflow: hidden;
}

/* ── Instagram / Facebook кірістірілген жазба ──
   Жария жазбалар олардың /embed және plugins мекенжайы арқылы
   iframe-де ашылады. Биіктігі тұрақты емес, сондықтан шектейміз. */
.social-frame {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.social-frame iframe {
  display: block;
  width: 100%;
  border: 0;
  height: 620px;
}
.social-frame.instagram iframe { height: 660px; }
.social-frame.facebook  iframe { height: 580px; }

@media (max-width: 600px) {
  .social-frame iframe { height: 540px; }
}

/* YouTube ойнатқыш */
.yt-frame-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;   /* 16:9 */
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}
.yt-frame-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media print {
  .devcard-table textarea.dev-cell {
    border: none;
    background: none;
    height: auto;
  }
}
