﻿/* ============================================================
   taxi.css - раздел такси: панель фильтров, список карточками и таблицей.
   Разметку рисует modulesTaxi/ucTaxiList.ascx. Картинок нет вообще:
   метки видов служб и значки - css и текст.
   ============================================================ */

/* Колонка страницы уже списка: без этого длинные названия и описания
   вылезали за неё и наезжали на правый сайдбар. */
.nmTaxi {
  font: 13px/1.45 Arial, Helvetica, sans-serif;
  color: #222;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.nmTaxi a { color: #005599; }

/* --- шапка раздела: заголовок и переключатель вида --- */

.nmTaxiHead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0c000;
}

.nmTaxiHead h3 { margin: 0; font: 700 21px/1.2 Arial, Helvetica, sans-serif; color: #222; }

.nmTaxiHead .nmTaxiCity { color: #888; font-weight: 400; }

.nmTaxiSpace { flex: 1 1 auto; }

/* --- переключатель вида списка --- */

.nmTaxiView { display: flex; gap: 0; }

.nmTaxiView a, .nmTaxiView span {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid #d5d5d5;
  background: #fff;
  color: #555;
  text-decoration: none;
  font-size: 12px;
}

.nmTaxiView a:first-child, .nmTaxiView span:first-child { border-radius: 3px 0 0 3px; }
.nmTaxiView a:last-child, .nmTaxiView span:last-child { border-radius: 0 3px 3px 0; border-left: 0; }
.nmTaxiView a:hover { color: #c00; border-color: #c9c9c9; }

.nmTaxiView .nmTaxiViewOn { background: #333; border-color: #333; color: #fff; cursor: default; }

.nmTaxiView svg { display: block; }

/* --- переключатель вида службы --- */

.nmTaxiTypes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 14px;
}

.nmTaxiTypes a {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  background: #f6f6f6;
  color: #444;
  text-decoration: none;
  font-size: 13px;
}

.nmTaxiTypes a:hover { border-color: #c9c9c9; background: #efefef; color: #c00; }

.nmTaxiTypes .nmTaxiTypeOn {
  background: #222;
  border-color: #222;
  color: #fff;
}

.nmTaxiTypes .nmTaxiTypeOn:hover { background: #222; color: #fff; }

/* порядок списка - справа в строке видов службы */

.nmTaxiSort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-left: auto;
  font-size: 12px;
  color: #8a8f98;
}

.nmTaxiTypes .nmTaxiSort a {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #4d5661;
  font-size: 12px;
}

.nmTaxiTypes .nmTaxiSort a:hover { background: none; color: #c00; }

.nmTaxiSortOn { color: #c00; font-weight: 700; }

/* --- метка вида службы --- */

.nmTaxiType {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font: 700 11px/17px Arial, Helvetica, sans-serif;
  color: #fff;
  white-space: nowrap;
  vertical-align: 1px;
}

.nmTaxiTypeTaxi { background: #f0a800; }
.nmTaxiTypePrivate { background: #6b8fb5; }
.nmTaxiTypeEvac { background: #b5603f; }
.nmTaxiTypeTruck { background: #5f8a5f; }

/* --- карточки --- */

.nmTaxiCards {
  display: grid;
  align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.nmTaxiCard {
  min-width: 0;
  border: 1px solid #e4e4e4;
  border-radius: 4px;
  background: #fff;
  padding: 12px 14px;
}

.nmTaxiCard:hover { border-color: #d0d0d0; box-shadow: 0 1px 4px rgba(0, 0, 0, .07); }

.nmTaxiCardHead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }

.nmTaxiName { font: 700 15px/1.3 Arial, Helvetica, sans-serif; }
.nmTaxiName a { color: #222; text-decoration: none; }
.nmTaxiName a:hover { color: #c00; }

.nmTaxiCity { color: #888; font-size: 12px; }

/* телефон - главное, зачем сюда приходят: крупно и сразу набирается */
.nmTaxiPhones { margin: 9px 0 0; }

.nmTaxiPhones a {
  display: inline-block;
  margin-right: 10px;
  white-space: nowrap;
  font: 700 16px/1.35 Arial, Helvetica, sans-serif;
  color: #111;
  text-decoration: none;
}

.nmTaxiPhones a:hover { color: #c00; }

.nmTaxiMore { font-size: 12px; font-weight: 400 !important; color: #005599 !important; }

.nmTaxiPrices {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #f0f0f0;
}

.nmTaxiPrice { line-height: 1.25; }
.nmTaxiPrice b { display: block; font: 700 14px/1.3 Arial, Helvetica, sans-serif; color: #222; }
.nmTaxiPrice span { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .03em; }

.nmTaxiFlags { margin-top: 9px; }

.nmTaxiFlag {
  display: inline-block;
  margin: 0 5px 4px 0;
  padding: 2px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  background: #fafafa;
  font-size: 11px;
  color: #666;
}

.nmTaxiLinks { margin-top: 9px; font-size: 12px; }
.nmTaxiLinks a { margin-right: 10px; }

/* описания приходят строкой через запятую без пробелов - рвём по буквам */
.nmTaxiText { margin-top: 8px; font-size: 12px; color: #666; overflow-wrap: anywhere; word-break: break-word; }

/* --- таблица --- */

/* fixed - иначе колонка телефонов раздувает таблицу шире колонки страницы */
.nmTaxiTable { width: 100%; table-layout: fixed; border-collapse: collapse; }

.nmTaxiTable col.nmTaxiColName { width: 33%; }
.nmTaxiTable col.nmTaxiColCity { width: 14%; }
.nmTaxiTable col.nmTaxiColPhone { width: 31%; }
.nmTaxiTable col.nmTaxiColPrice { width: 11%; }

.nmTaxiTable th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid #e4e4e4;
  font: 700 11px/1.4 Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #888;
  white-space: nowrap;
}

.nmTaxiTable td { padding: 9px 10px; border-bottom: 1px solid #f0f0f0; vertical-align: top; overflow-wrap: break-word; }

.nmTaxiTable tr:hover td { background: #fcfaf3; }

.nmTaxiTable .nmTaxiNum { white-space: nowrap; font-weight: 700; }

.nmTaxiTable .nmTaxiPhones { margin: 0; }

/* в колонке два номера рядом не помещаются - ставим их друг под другом */
.nmTaxiTable .nmTaxiPhones a { display: block; font-size: 14px; margin: 0 0 2px 0; }
.nmTaxiTable .nmTaxiPhones a.nmTaxiMore { display: inline-block; }

/* --- карточка службы --- */

/* телефоны в карточке - крупнее, чем в списке: за ними сюда и приходят */
.nmTaxiPhonesBig { margin: 14px 0 4px; }
.nmTaxiPhonesBig a { font-size: 20px; margin-right: 16px; }

.nmTaxi .nmTaxiPrices { display: inline-flex; margin: 10px 0 0; padding-top: 0; border-top: 0; }
.nmTaxi .nmTaxiFlags { margin: 10px 0 16px; }
.nmTaxi .nmTaxiFlags a { margin-left: 8px; font-size: 12px; }

.nmTaxiInfo { width: 100%; border-collapse: collapse; margin-bottom: 16px; }

.nmTaxiInfo th {
  width: 210px;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  vertical-align: top;
  font: 400 13px/1.4 Arial, Helvetica, sans-serif;
  color: #888;
}

.nmTaxiInfo td {
  padding: 9px 0;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: top;
  overflow-wrap: break-word;
}

.nmTaxiInfo tr:last-child th, .nmTaxiInfo tr:last-child td { border-bottom: 0; }

/*
    Панель оценки приходит из VoteHtmlHelper с инлайновым position:relative; top:-20px -
    так её подтягивали к заголовку в вёрстке 2009 года. В карточке службы она из-за
    этого наезжала на последнюю строку таблицы и на полосу комментариев.
*/
.nmTaxiRate { overflow: hidden; margin-bottom: 14px; }

.nmTaxiRate .interact { position: static !important; top: auto !important; margin: 0 !important; }

/* --- пусто --- */

.nmTaxiEmpty {
  padding: 26px 10px;
  text-align: center;
  color: #888;
  border: 1px dashed #e0e0e0;
  border-radius: 4px;
}

/* --- телефон --- */

@media (max-width: 700px) {
  .nmTaxiHead h3 { font-size: 18px; }

  .nmTaxiCards { grid-template-columns: minmax(0, 1fr); }

  /* таблица в столбик: заголовок колонки подставляется из data-label */
  .nmTaxiTable, .nmTaxiTable tbody, .nmTaxiTable tr, .nmTaxiTable td { display: block; width: auto; }
  .nmTaxiTable thead { display: none; }

  .nmTaxiTable tr {
    border: 1px solid #e4e4e4;
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 10px 12px;
  }

  .nmTaxiTable td { border: 0; padding: 3px 0; }

  .nmTaxiTable td[data-label]:before {
    content: attr(data-label) ": ";
    color: #999;
    font-size: 11px;
    text-transform: uppercase;
  }

  .nmTaxiTable td.nmTaxiCellName:before { content: ''; }

  /* подпись без значения читается как потеря данных */
  .nmTaxiTable td.nmTaxiCellEmpty { display: none; }
}

/* Подписи переключателя вида свёрнуты до иконок и раскрываются при наведении,
   как у переключателя ленты (.nmSwitch); на телефоне тоже свёрнуты. */
.nmTaxiView a, .nmTaxiView span { gap: 0; }
.nmTaxiViewText {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  margin-left: 0;
  white-space: nowrap;
  transition: max-width .22s ease, opacity .18s ease, margin-left .22s ease;
}
.nmTaxiView a:hover .nmTaxiViewText, .nmTaxiView a:focus .nmTaxiViewText, .nmTaxiView span:hover .nmTaxiViewText {
  max-width: 120px;
  opacity: 1;
  margin-left: 5px;
}

/* --- список, макет taxilist-b: телефонов в списке нет, вместо них кнопка в карточку; под названием признаки и голоса --- */

.nmTaxiTable col.nmTaxiColName { width: 31%; }
.nmTaxiTable col.nmTaxiColCity { width: 17%; }
.nmTaxiTable col.nmTaxiColPhone { width: 21%; }
.nmTaxiTable col.nmTaxiColPrice { width: 17%; }
.nmTaxiTable col.nmTaxiColMin { width: 14%; }
.nmTaxiNameRow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; }
.nmTaxiSub { margin-top: 3px; font-size: 11px; line-height: 1.35; color: #8a8f98; }
/* признак целиком в строке, точка висит в конце предыдущего - при переносе не уезжает в начало новой строки */
.nmTaxiSub span { white-space: nowrap; }
.nmTaxiSub span:not(:last-child):after { content: "\00b7"; margin: 0 2px 0 5px; color: #c5cbd3; }
.nmTaxi a.nmTaxiCityLink { color: #4d5661; }
.nmTaxi a.nmTaxiCityLink:hover { color: #c00; }
.nmTaxiNone { color: #c5cbd3; font-weight: 400; }
.nmTaxi a.nmTaxiOpen {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
  border: 1px solid #d9e3ee; border-radius: 16px; background: #f6f9fc;
  color: #1a5f80; font: 700 12px/16px Arial, Helvetica, sans-serif; white-space: nowrap; text-decoration: none;
}
.nmTaxi a.nmTaxiOpen:hover { border-color: #b9d6ee; background: #eef5fb; color: #c00; }
.nmTaxiOpen i { font-style: normal; font-weight: 400; color: #8a8f98; }

/* --- карточка службы, макет taxi-c: полоса фактов под заголовком, телефон открывается кнопкой --- */

.nmTaxiAlone h1.nmTaxiTitle { margin: 8px 0 0; font: 700 26px/1.2 Georgia, "Times New Roman", serif; color: #16324a; }
.nmTaxiAlone h1.nmTaxiTitle .nmTaxiType { vertical-align: 4px; }
.nmTaxiMeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; color: #8a8f98; font-size: 12px; }
.nmTaxiEye { display: inline-flex; align-items: center; gap: 4px; }
.nmTaxiEye:before {
  content: ""; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6.5 5 2.3 9.2 1 12c1.3 2.8 5.5 7 11 7s9.7-4.2 11-7c-1.3-2.8-5.5-7-11-7zm0 11.5A4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 0 1 0 9zm0-7a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5z'/%3E%3C/svg%3E") no-repeat center/contain;
  mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5C6.5 5 2.3 9.2 1 12c1.3 2.8 5.5 7 11 7s9.7-4.2 11-7c-1.3-2.8-5.5-7-11-7zm0 11.5A4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 0 1 0 9zm0-7a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5z'/%3E%3C/svg%3E") no-repeat center/contain;
}
.nmTaxiStrip { display: flex; flex-wrap: wrap; margin: 14px 0 0; border: 1px solid #e4ebf2; border-radius: 8px; overflow: hidden; }
.nmTaxiStrip > div { flex: 1 1 auto; min-width: 84px; padding: 9px 12px; border-right: 1px solid #e4ebf2; background: #fff; }
.nmTaxiStrip > div:last-child { border-right: 0; }
.nmTaxiStrip b { display: block; font: 700 15px/1.25 Arial, Helvetica, sans-serif; color: #16324a; }
.nmTaxiStrip > div > span { font-size: 11px; color: #8a8f98; text-transform: uppercase; }
.nmTaxiStrip > div.nmTaxiStripPhone { flex: 2 1 160px; background: #fffbea; }
.nmTaxiStripPhone b { font-size: 17px; color: #3a2e00; }
.nmTaxiStripPhone .nmTaxiPhone { display: block; letter-spacing: .3px; }
.nmTaxi .nmTaxiStripPhone a.nmTaxiPhone { color: #3a2e00; text-decoration: none; }
.nmTaxi .nmTaxiStripPhone a.nmTaxiPhone:hover { color: #c00; }
.nmTaxi a.nmTaxiShow {
  display: inline-block; margin-top: 4px; padding: 2px 10px; border-radius: 12px; background: #c00;
  color: #fff; font: 700 12px/16px Arial, Helvetica, sans-serif; letter-spacing: 0; text-decoration: none;
}
.nmTaxi a.nmTaxiShow:hover { background: #a00; color: #fff; }
.nmTaxiAlone .nmTaxiFlags { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; }
.nmTaxiAlone .nmTaxiFlags .nmTaxiFlag, .nmTaxiAlone .nmTaxiFlags a {
  display: inline-flex; align-items: center; gap: 5px; margin: 0; padding: 3px 10px;
  border: 1px solid #dde3e9; border-radius: 12px; background: #fff; color: #4d5661; font-size: 12px; text-decoration: none;
}
.nmTaxiAlone .nmTaxiFlags .nmTaxiFlagOk { border-color: #b7dcb0; background: #eef9ea; color: #2f6b2f; }
.nmTaxiAlone .nmTaxiFlags .nmTaxiFlagOk:before { content: "\2713"; font-weight: 700; }
.nmTaxiAlone .nmTaxiFlags a { border-color: #b9d6ee; background: #f4f9fd; color: #1a5f80; }
.nmTaxiAlone dl.nmTaxiInfo { display: grid; grid-template-columns: 180px 1fr; margin: 18px 0 0; border-top: 1px solid #eef2f6; }
.nmTaxiAlone .nmTaxiInfo dt, .nmTaxiAlone .nmTaxiInfo dd { margin: 0; padding: 9px 0; border-bottom: 1px solid #f0f3f6; }
.nmTaxiAlone .nmTaxiInfo dt { padding-right: 12px; color: #8a8f98; font-size: 13px; }
.nmTaxiAlone .nmTaxiInfo dd { color: #2f333a; font-size: 13.5px; line-height: 1.5; overflow-wrap: anywhere; }
.nmTaxiAlone .nmArticleBar { margin-top: 16px; }

@media (max-width: 700px) {
  .nmTaxiAlone h1.nmTaxiTitle { font-size: 21px; }
  .nmTaxiAlone dl.nmTaxiInfo { grid-template-columns: 1fr; }
  .nmTaxiAlone .nmTaxiInfo dt { padding-bottom: 0; border-bottom: 0; }
  .nmTaxiStrip > div { border-bottom: 1px solid #e4ebf2; }
}
