* {
    box-sizing: border-box;
}

body {
    margin: 0;

    background:
        radial-gradient(
            circle at top,
            #292929,
            #080808 55%
        );

    color: #ffffff;

    font-family:
        Arial,
        sans-serif;
}


.app {
    width: 100%;
    max-width: 600px;

    min-height: 100vh;

    margin: auto;

    background: #101010;
}


.header {

    display: flex;

    align-items: center;

    gap: 15px;

    padding: 22px;

    border-bottom:
        1px solid #292929;
}


.logo {

    width: 58px;
    height: 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background: #ffffff;

    color: #111111;

    font-size: 30px;
}


.header h1 {

    margin: 0;

    font-size: 22px;

    letter-spacing: 2px;
}


.header p {

    margin: 5px 0 0;

    color: #888;

    font-size: 11px;

    letter-spacing: 2px;
}


main {

    padding: 18px;
}


.hero {

    padding:
        10px
        5px
        20px;
}


.hero h2 {

    margin-bottom: 8px;

    font-size: 27px;
}


.hero p {

    color: #999;

    margin: 0;
}


.card {

    background: #191919;

    border:
        1px solid #292929;

    border-radius: 18px;

    padding: 18px;

    margin-bottom: 15px;

    box-shadow:
        0 10px 30px
        rgba(0,0,0,.25);
}


.card h3 {

    margin-top: 0;

    margin-bottom: 16px;

    font-size: 17px;
}


.services{
    width:calc(100% + 32px);
    margin-left:-16px;
    margin-right:-16px;
    padding:0 16px;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    box-sizing:border-box;
}


.service {

    min-height: 95px;

    border: 1px solid #333;

    border-radius: 14px;

    background: #222;

    color: white;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 8px;

    font-size: 24px;
}


.service span {

    font-size: 12px;

    line-height: 15px;
}


.service.active {

    background: #ffffff;

    color: #111;

    border-color: #ffffff;
}


input {

    width: 100%;

    padding: 15px;

    margin-bottom: 12px;

    border-radius: 11px;

    border: 1px solid #333;

    background: #222;

    color: #fff;

    font-size: 16px;

    outline: none;
}


input:focus {

    border-color: #777;
}


label {

    display: block;

    color: #999;

    margin-bottom: 7px;
}


.times {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 9px;
}


.time {

    padding: 13px 5px;

    border-radius: 10px;

    border: 1px solid #333;

    background: #222;

    color: white;

    font-size: 15px;
}


.time.selected {

    background: #ffffff;

    color: #111;

    border-color: #ffffff;
}


.time:disabled {

    opacity: .35;
}


.book-button {

    width: 100%;

    padding: 17px;

    margin-top: 10px;

    border: none;

    border-radius: 12px;

    background: #ffffff;

    color: #111111;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;
}


.book-button:active {

    transform: scale(.98);
}


.message {

    margin-bottom: 20px;
}


.success {

    padding: 17px;

    border-radius: 13px;

    background: #19351f;

    color: #8cffaa;
}


.warning {

    padding: 17px;

    border-radius: 13px;

    background: #332b16;

    color: #ffd866;
}


.whatsapp {

    display: block;

    margin-top: 10px;

    padding: 15px;

    text-align: center;

    text-decoration: none;

    border-radius: 11px;

    background: #25D366;

    color: white;

    font-weight: bold;
}


footer {

    padding: 25px;

    display: flex;

    justify-content: space-between;

    color: #666;

    font-size: 11px;
}

/* =========================
   ФОТО УСЛУГ НА КЛИЕНТЕ
========================= */

.service-photo-client {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border-radius: 14px;
    object-fit: cover;
    background: #242428;
}

.service-photo-client-empty {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    border-radius: 14px;
    background: #242428;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.service-client-info {
    display: block;
    text-align: left;
    flex: 1;
}

#services .service {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
}


/* =====================================================
   ВЫБОР ТИПА САЛОНА
===================================================== */

.salon-type-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.salon-type-button {
    min-height: 58px;
    border: 1px solid #333;
    border-radius: 14px;
    background: #222;
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: .2s;
}

.salon-type-button:active {
    transform: scale(.97);
}

.salon-type-button.active {
    background: #fff;
    color: #111;
    border-color: #fff;
}


/* =====================================================
   СТАТУС ГЕОЛОКАЦИИ
===================================================== */

.location-status {
    padding: 12px 14px;
    margin-bottom: 12px;
    border-radius: 11px;
    background: #222;
    color: #aaa;
    font-size: 13px;
    line-height: 18px;
}


/* =====================================================
   ПОИСК МАСТЕРА / САЛОНА
===================================================== */

#masterSearch {
    margin-bottom: 15px;
}


/* =====================================================
   СПИСОК МАСТЕРОВ
===================================================== */

#masters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}


/* =====================================================
   КАРТОЧКА МАСТЕРА
===================================================== */

.master-card {
    display: flex;
    flex-direction: column;
    gap: 12px;

    padding: 14px;

    background: #202020;

    border: 1px solid #333;
    border-radius: 16px;

    transition: .2s;
}

.master-card:active {
    transform: scale(.985);
}


/* =====================================================
   ВЕРХ КАРТОЧКИ
===================================================== */

.master-card-top {
    display: flex;
    align-items: center;
    gap: 13px;
}


/* =====================================================
   ФОТО МАСТЕРА
===================================================== */

.master-card-photo {
    width: 72px;
    height: 72px;

    flex: 0 0 72px;

    border-radius: 14px;

    object-fit: cover;

    background: #292929;
}

.master-card-photo-empty {
    width: 72px;
    height: 72px;

    flex: 0 0 72px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: #292929;

    font-size: 32px;
}


/* =====================================================
   ИНФОРМАЦИЯ МАСТЕРА
===================================================== */

.master-card-info {
    min-width: 0;
    flex: 1;
}

.master-card-name {
    margin: 0 0 5px;

    font-size: 17px;
    font-weight: bold;

    color: #fff;
}

.master-card-salon {
    margin: 0 0 5px;

    color: #aaa;

    font-size: 13px;
}

.master-card-distance {
    margin: 0;

    color: #ccc;

    font-size: 12px;
}


/* =====================================================
   КНОПКИ КАРТОЧКИ
===================================================== */

.master-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.master-select-button,
.master-route-button {
    min-height: 46px;

    border-radius: 11px;

    font-size: 13px;
    font-weight: bold;

    cursor: pointer;
}

.master-select-button {
    border: none;

    background: #fff;
    color: #111;
}

.master-route-button {
    border: 1px solid #444;

    background: #292929;
    color: #fff;

    text-decoration: none;

    display: flex;
    align-items: center;
    justify-content: center;
}


/* =====================================================
   НЕТ МАСТЕРОВ
===================================================== */

.no-masters {
    padding: 20px;

    border-radius: 14px;

    background: #222;

    color: #999;

    text-align: center;

    line-height: 21px;
}


/* =====================================================
   АДАПТАЦИЯ ПОД МАЛЕНЬКИЙ ЭКРАН
===================================================== */

@media (max-width: 380px) {

    .salon-type-button {
        font-size: 13px;
    }

    .master-card-actions {
        grid-template-columns: 1fr;
    }

}

/* =========================
   ФОТО УСЛУГ
========================= */

.service-card{
    overflow:hidden;
    padding:12px;
    box-sizing:border-box;
    width:100%;
    min-height:180px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:space-between;
    text-align:center;
}

.service-card .service-name{
    order:1;
    width:100%;
    min-height:22px;
    margin:0;
    font-size:16px;
    font-weight:700;
    text-align:center;
}

.service-image{
    order:2;
    display:block;
    width:86px;
    height:86px;
    object-fit:cover;
    border-radius:12px;
    margin:8px auto;
    background:#242428;
    flex:0 0 86px;
}

.service-card .service-details{
    order:3;
    width:100%;
    margin:0;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:6px;
    font-size:14px;
    color:#000;
    text-align:center;
}

@media (max-width:600px){
    .service-image{
        width:86px;
        height:86px;
    }
}


/* =========================
   ИСПРАВЛЕНИЕ КЛИКА ПО УСЛУГЕ
========================= */

.service-image {
    pointer-events: none;
}



/* =========================================================
   НАСТРОЙКИ КЛИЕНТСКОЙ СТРАНИЦЫ
========================================================= */

.client-logo-image {
    display: block;
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 10px;
}


/* =========================
   ШАПКА С ФОТО
========================= */

.client-header-with-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* =========================
   ФОН СТРАНИЦЫ
========================= */

.client-background-with-image {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}


/* =========================
   КНОПКИ КАТЕГОРИЙ
========================= */

.salon-type-button {
    overflow: hidden;
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 0;

    min-height: 120px;
}


/* =========================
   ФОТО КАТЕГОРИИ
========================= */

.client-category-image {
    display: block;

    width: 100%;
    height: 82px;

    object-fit: cover;

    pointer-events: none;
}


/* =========================
   НАЗВАНИЕ КАТЕГОРИИ
========================= */

.client-category-name {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 38px;

    padding: 5px 8px;

    box-sizing: border-box;

    font-size: 14px;
    font-weight: bold;

    text-align: center;

    color: inherit;
}


@media (max-width: 380px) {

    .salon-type-button {
        min-height: 110px;
    }

    .client-category-image {
        height: 74px;
    }

    .client-category-name {
        font-size: 13px;
    }

}



/* =====================================================
   ЧИСТАЯ ШАПКА КЛИЕНТА
===================================================== */

#clientHeader {
    width: 100%;
    height: 180px;

    margin: 0;
    padding: 0;

    background-color: transparent;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;

    overflow: visible;

    display: block;

    position: relative;
}

#clientHeader.client-header-with-image {
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

@media (max-width: 600px) {
    #clientHeader {
        width: 100%;
        height: 150px;
    }
}


/* =====================================================
   ЗАГОЛОВОК ОНЛАЙН ЗАПИСЬ
===================================================== */

.hero {
    padding-top: 10px;
    padding-bottom: 10px;
    text-align: center;
}

.hero h2 {
    margin: 0;
    text-align: center;
}


/* Поднимаем заголовок "Онлайн запись" выше */
.hero {
    padding-top: 0 !important;
    padding-bottom: 10px;
}

.hero h2 {
    margin-top: -8px !important;
    text-align: center;
}


/* =====================================================
   УВЕЛИЧЕНИЕ КАРТОЧЕК МУЖСКОЙ И ЖЕНСКИЙ САЛОН
===================================================== */

.salon-type-buttons {
    gap: 14px;
}

.salon-type-button {
    min-height: 150px;
    padding: 12px;
    font-size: 17px;
}

.salon-type-button img {
    width: 110px;
    height: 110px;
    object-fit: contain;
}

@media (max-width: 600px) {
    .salon-type-button {
        min-height: 140px;
        padding: 10px;
    }

    .salon-type-button img {
        width: 100px;
        height: 100px;
    }
}



/* Единый фон области изображений салонов */
.salon-type-button .client-category-image {
    background: #222;
}


/* ЕДИНЫЙ БЕЛЫЙ ФОН САЛОНА */
.salon-type-button {
    background: #fff;
    color: #111;
}

.salon-type-button .client-category-image {
    background: #fff;
}

.salon-type-button.active {
    background: #fff;
    color: #111;
    border-color: #fff;
}

.salon-type-button.active .client-category-image {
    background: #fff;
}


/* Выбранный салон — тонкая зелёная рамка */
.salon-type-button.active {
    background: #fff;
    color: #111;
    border: 2px solid #22c55e;
}


/* Немного увеличиваем только изображение */
.salon-type-button img {
    width: 110px;
    height: 110px;
    object-fit: contain;
}


/* Немного увеличиваем только изображение */
.salon-type-button img {
    width: 130px;
    height: 130px;
    object-fit: contain;
}


/* Немного уменьшаем высоту кнопок салона */
.salon-type-button {
    min-height: 125px;
}

@media (max-width: 600px) {
    .salon-type-button {
        min-height: 125px;
    }
}


/* Немного уменьшаем высоту кнопок салона */
.salon-type-button {
    min-height: 110px;
}

@media (max-width: 600px) {
    .salon-type-button {
        min-height: 110px;
    }
}


/* Немного увеличиваем только изображение */
.salon-type-button img {
    width: 115px;
    height: 115px;
    object-fit: contain;
}



/* =====================================================
   ПОЛНОЭКРАННЫЙ ПРОФИЛЬ МАСТЕРА
===================================================== */

#masterProfile.master-profile-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 20px !important;
    box-sizing: border-box !important;

    background: #fff !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    z-index: 9999 !important;

    border-radius: 0 !important;
}


/* Чтобы профиль действительно занимал весь экран */
#masterProfile.master-profile-fullscreen .master-profile-name {
    font-size: 26px;
}


/* На телефоне */
@media (max-width: 600px) {

    #masterProfile.master-profile-fullscreen {
        padding:
            calc(20px + env(safe-area-inset-top))
            16px
            calc(20px + env(safe-area-inset-bottom))
            16px !important;
    }

}


/* =====================================================
   ТЕКСТ ПРОФИЛЯ МАСТЕРА НА БЕЛОМ ФОНЕ
===================================================== */

#masterProfile.master-profile-fullscreen,
#masterProfile.master-profile-fullscreen #masterInfo,
#masterProfile.master-profile-fullscreen #masterInfo div {
    color: #111 !important;
}


#masterProfile.master-profile-fullscreen .master-profile-name {
    color: #111 !important;
    font-size: 26px;
    font-weight: 700;
}


#masterProfile.master-profile-fullscreen .master-description {
    color: #333 !important;
}


#masterProfile.master-profile-fullscreen a {
    color: #111 !important;
}


#masterProfile.master-profile-fullscreen button {
    color: #111 !important;
}

/* =====================================================
   ПРОФИЛЬ КЛИЕНТА В ШАПКЕ
===================================================== */

#clientProfileMenu {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1000;
}

#clientProfileButton {
    width: 46px;
    height: 46px;

    border: none;
    border-radius: 50%;

    background: rgba(255,255,255,0.95);

    color: #111;

    font-size: 22px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    box-shadow:
        0 3px 12px rgba(0,0,0,0.35);

    -webkit-tap-highlight-color: transparent;
}

#clientProfileDropdown {
    position: absolute;

    top: 54px;
    right: 0;

    width: 230px;

    background: #fff;
    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 8px 30px rgba(0,0,0,0.35);

    z-index: 1001;
}

#clientProfileDropdown a {
    display: block;

    padding: 15px 16px;

    color: #111;

    text-decoration: none;

    font-size: 15px;

    border-bottom: 1px solid #eee;
}

#clientProfileDropdown a:last-child {
    border-bottom: none;
}

#clientProfileDropdown a:active {
    background: #f0f0f0;
}


/* Позиция изображения шапки клиента */
#clientHeader {
    background-position: center 48% !important;
}
