/* =====================================================================
   Tour-Group — корпоративна тема для САМО-Тур (samo.tour-group.com)
   Файл: public/css/customer.css  (офіційний хук САМО, підключається
   у header.tpl автоматично, вендор його не перезаписує)
   Версія: 1.0 — 2026-11-19
   ===================================================================== */

/* ---------- Шрифти ---------- */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

@font-face {
    font-family: 'MagistralC';
    src: url('/tg/fonts/MagistralC.otf') format('opentype');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'MagistralC';
    src: url('/tg/fonts/MagistralC-Bold.otf') format('opentype');
    font-weight: 700;
    font-display: swap;
}

/* ---------- Фірмова палітра TG + змінні теми САМО ---------- */
:root {
    --tg-purple: #6f3f82;
    --tg-purple-dark: #5a3269;
    --tg-green: #afca0b;
    --tg-green-dark: #94ab09;
    --tg-dark: #312f33;
    --tg-bg: #f4f4f4;
    --tg-card: #ffffff;
    --tg-line: #e3e3e6;
    --tg-text: #212529;
    --tg-muted: #6c6a70;
    --tg-radius: 12px;
    --tg-shadow: 0 2px 14px rgba(49, 47, 51, .07);
    --tg-heading-font: 'MagistralC', 'Open Sans', sans-serif;

    /* змінні САМО (common.css) */
    --main-panel-bgcolor: var(--tg-card);
    --table-header-bgcolor: var(--tg-purple);
    --main-button-bgcolor: var(--tg-purple);
    --main-button-color: #ffffff;
    --hover-button-bgcolor: var(--tg-purple-dark);
    --inactive-button-bgcolor: #ebebed;
    --form-legend-bgcolor: #f1ecf3;
    --form-legend-color: var(--tg-purple);
    --link-active-color: var(--tg-purple);
    --link-hover-color: var(--tg-green-dark);
    --row-border-color: var(--tg-line);
    --row-even-bgcolor: #ffffff;
    --row-odd-bgcolor: #f7f6f8;
    --main-font-family: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --menu-bgcolor: #ffffff;
    --item-active-background: #f4f0f6;
    --item-active-color: var(--tg-purple);
}

body {
    background: var(--tg-bg);
    color: var(--tg-text);
    font-family: var(--main-font-family);
}

a { color: var(--tg-purple); }
a:hover { color: var(--tg-green-dark); }

/* =====================================================================
   HEADER — як на tour-group.com
   ===================================================================== */

/* Верхня темна смуга (розмітка — templates/tg_topbar.tpl) */
.tg-topbar {
    background: var(--tg-dark);
    color: #fff;
    font-family: 'Open Sans', sans-serif;
    font-size: 13px;
}
.tg-topbar__wrap {
    max-width: var(--main-container-width, 1200px);
    margin: 0 auto;
    padding: 0 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 28px;
}
.tg-topbar__info {
    display: flex;
    align-items: center;
}
.tg-topbar__info > * {
    color: #fff !important;
    text-decoration: none;
    padding: 0 15px;
    border-left: 1px solid rgba(255, 255, 255, .25);
    line-height: 15px;
    white-space: nowrap;
}
.tg-topbar__info > *:first-child { border-left: 0; }
.tg-topbar__info a:hover { color: var(--tg-green) !important; }
.tg-topbar__social { display: flex; gap: 14px; }
.tg-topbar__social a {
    color: var(--tg-green) !important;
    font-size: 21px;
    line-height: 1;
    text-decoration: none;
    transition: opacity .15s;
}
.tg-topbar__social a:hover { opacity: .75; }

/* Рядок з лого + меню: збираємо .high-menu і .menu в один білий рядок */
#header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    background: #fff;
    font-family: var(--main-font-family);
}
#header > .tg-topbar,
#header .banner { grid-column: 1 / -1; }
#header > .bottom-menu { display: contents; }

#header .high-menu,
#header .bottom-menu .menu { width: auto !important; min-width: 0; margin: 0 !important; }
#header .high-menu {
    display: flex;
    align-items: center;
    height: 76px;
    padding-left: max(15px, calc((100vw - var(--main-container-width, 1200px)) / 2 + 15px));
    background: #fff;
}
#header .high-menu .logo { margin: 0; padding: 0; float: none; }
#header .high-menu img.logo { height: 76px; max-height: none; width: auto; display: block; } /* PNG 150×150 з полями */
/* курс валют переїхав у верхню смугу */
#header .high-menu .currency-header { display: none; }
#header .high-menu .note-header.tg-empty { display: none; }

#header .bottom-menu .menu {
    background: #fff;
    height: 76px;
    padding-right: max(15px, calc((100vw - var(--main-container-width, 1200px)) / 2 + 15px));
    display: flex;
    justify-content: flex-end;
}
#header .nav { height: 100%; background: transparent; width: auto !important; }
#header .nav-center { width: auto !important; }
#header .nav-center {
    height: 100%;
    display: flex !important;
    align-items: stretch;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
    background: transparent;
}
#header .nav-center > li {
    display: flex;
    align-items: center;
    position: relative;
    background: transparent;
}
#header .nav-center > li > a {
    font-family: var(--tg-heading-font);
    font-weight: 700;
    font-size: 16px;
    color: var(--tg-dark) !important;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    background: transparent !important;
    text-decoration: none;
    transition: color .15s;
}
#header .nav-center > li > a:hover,
#header .nav-center > li.selected > a { color: var(--tg-purple) !important; }
#header .nav-center > li.selected > a { box-shadow: inset 0 -3px 0 var(--tg-green); }

/* Випадаючі пункти */
#header .nav-center li ul {
    background: #fff;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 28px rgba(49, 47, 51, .14);
    padding: 6px 0;
    top: 100%;
    overflow: hidden;
    z-index: 1000;
}
#header .nav-center li ul a {
    background: #fff !important;
    color: var(--tg-dark) !important;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    padding: 9px 20px;
}
#header .nav-center li ul a:hover,
#header .nav-center li ul li.selected a {
    background: #f4f0f6 !important;
    color: var(--tg-purple) !important;
}

/* «Вхід» — зелений блок, як «Онлайн пошук туру» на головному сайті */
#header .nav-center > li.sign-in { margin-left: 10px; }
#header .nav-center > li.sign-in > a {
    background: var(--tg-green) !important;
    color: #fff !important;
    padding: 0 26px;
    margin-top: -6px;           /* виступає над рядком, як на головному */
    height: calc(100% + 6px);
    background-image: none !important;
}
#header .nav-center > li.sign-in > a:hover { background: var(--tg-green-dark) !important; }

/* іконка «посилання на цю сторінку» */
#header #samo-link-to-page { display: flex; align-items: center; padding: 0 6px; opacity: .55; }
#header #samo-link-to-page:hover { opacity: 1; }

/* Банер-слайдер */
#header .banner { background: var(--tg-bg); }

/* Мобільне меню (menu-mobile.tpl) */
.mobile-menu-container { background: #fff; }
.tg-topbar + .mobile-menu-container { border-top: 0; }

@media (max-width: 900px) {
    .tg-topbar__wrap { justify-content: space-between; gap: 10px; }
    .tg-topbar__info .tg-topbar__mail { display: none; }
    .tg-topbar__info > * { padding: 0 10px; }
    #header .nav-center > li > a { padding: 0 10px; font-size: 15px; }
}
@media (max-width: 560px) {
    .tg-topbar__info .tg-topbar__rate { display: none; }
}

/* =====================================================================
   ПОШУК ТУРІВ — картки, вкладки, кнопки
   ===================================================================== */

.samo_container .std.container { padding-top: 18px; }

/* Вкладки «Пакетні тури / Готелі / Квитки» */
.searchmodes { display: flex; gap: 4px; }
.searchmodes .searchmode {
    border-radius: 10px 10px 0 0 !important;
    font-family: var(--tg-heading-font) !important;
    font-size: 16px !important;
}
.searchmodes .searchmode_selected {
    background: var(--tg-card) !important;
    color: var(--tg-purple);
    box-shadow: inset 0 3px 0 var(--tg-green);
    padding: 0 22px;
    display: flex; align-items: center;
}
.searchmodes .searchmode_not_selected a {
    background: #e7e6e9 !important;
    color: var(--tg-dark) !important;
    font-weight: 700;
    padding: 0 22px;
    border-radius: 10px 10px 0 0;
    transition: background .15s, color .15s;
}
.searchmodes .searchmode_not_selected a:hover {
    background: #ddd9e0 !important;
    color: var(--tg-purple) !important;
}

/* Панелі як білі картки */
.samo_container .note-panel,
.samo_container table.direction,
.samo_container table.hotels_container {
    background: var(--tg-card) !important;
    box-shadow: var(--tg-shadow);
}
.samo_container .note-panel {
    border-radius: 0 var(--tg-radius) 0 0 !important;
    color: var(--tg-text);
}
.samo_container .note-panel hr { border: 0; border-top: 1px solid var(--tg-line); }
.samo_container table.direction { border-radius: 0 0 var(--tg-radius) var(--tg-radius) !important; }
.samo_container table.hotels_container { border-radius: var(--tg-radius) !important; margin-top: 14px; }
.samo_container table.user_info {
    background: var(--tg-card);
    border-radius: var(--tg-radius);
    box-shadow: var(--tg-shadow);
    margin-top: 14px;
}

.samo_container,
.samo_container td,
.samo_container th,
.samo_container select,
.samo_container input,
.samo_container button { font-family: var(--main-font-family); }

/* Поля */
.samo_container select,
.samo_container input[type=text],
.samo_container input[type=number],
.samo_container .chosen-container .chosen-single {
    border: 1px solid #d2d0d6 !important;
    border-radius: 8px !important;
    background-color: #fff;
    box-shadow: none !important;
    transition: border-color .15s, box-shadow .15s;
}
.samo_container select:focus,
.samo_container input[type=text]:focus,
.samo_container input[type=number]:focus {
    border-color: var(--tg-purple) !important;
    box-shadow: 0 0 0 3px rgba(111, 63, 130, .15) !important;
    outline: none;
}
.samo_container input[type=checkbox] { accent-color: var(--tg-purple); }

/* Кнопки */
.samo_container button.load,
.samo_container .button,
.samo_container input[type=button],
.samo_container input[type=submit] {
    background: var(--tg-purple) !important;
    color: #fff !important;
    border: 0 !important;
    border-radius: 8px !important;
    font-family: var(--tg-heading-font);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .02em;
    padding: 0 28px;
    min-height: 40px;
    cursor: pointer;
    transition: background .15s, transform .1s;
}
.samo_container button.load:hover,
.samo_container .button:hover,
.samo_container input[type=button]:hover,
.samo_container input[type=submit]:hover { background: var(--tg-purple-dark) !important; }
.samo_container button.load:active { transform: translateY(1px); }

/* Таблиця результатів */
.samo_container table.res thead th,
.samo_container table.res th {
    background: var(--tg-purple);
    color: #fff;
    font-weight: 600;
}

/* =====================================================================
   КОМПАКТНИЙ ІНФОБЛОК (опис туру з адмінки САМО)
   Розгортання/згортання — у /tg/tg.js
   ===================================================================== */

/* прибираємо «вшиті» з редактора блакитні фони та шрифти */
td.note_container,
td.note_container * {
    background-color: transparent !important;
    font-family: var(--main-font-family) !important;
}
td.note_container { color: var(--tg-text) !important; font-size: 13px; line-height: 1.55; }
td.note_container [style*="102, 136, 170"],
td.note_container [style*="#6688aa"],
td.note_container [style*="rgb(34, 34, 34)"] { color: var(--tg-text) !important; }
td.note_container strong[style*="10pt"],
td.note_container [style*="font-size: 13px"] { font-size: 13px !important; }

.tg-note {
    position: relative;
    max-height: 168px;
    overflow: hidden;
    transition: max-height .35s ease;
}
.tg-note.is-open { max-height: 4000px; }
.tg-note:not(.is-open)::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 70px;
    background: linear-gradient(rgba(255, 255, 255, 0), #fff 85%);
    pointer-events: none;
}
.tg-note-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 4px;
    padding: 8px 18px;
    border: 1.5px solid var(--tg-purple);
    border-radius: 999px;
    background: #fff;
    color: var(--tg-purple);
    font-family: var(--tg-heading-font);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
/* сильніші селектори: перебиваємо загальні стилі кнопок САМО і правило td.note_container * */
td.note_container .tg-note-toggle {
    background: #fff !important;
    color: var(--tg-purple) !important;
    font-family: var(--tg-heading-font) !important;
}
td.note_container .tg-note-toggle:hover {
    background: var(--tg-purple) !important;
    color: #fff !important;
}
.tg-note-toggle .tg-note-arrow { display: inline-block; font-size: 16px; line-height: 1; transition: transform .25s; }
.tg-note.is-open + .tg-note-toggle .tg-note-arrow { transform: rotate(180deg); }

/* Підвал «© САМО-Софт» */
.samosoft { font-family: var(--main-font-family); color: var(--tg-muted); padding: 10px 15px 20px; }
.samosoft a { color: var(--tg-muted); }
