/* Общие стили */
body, html {
    margin: 0;
    padding: 0;
    height: 106%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
}

.phone-frame {
    /* Используем ширину и высоту экрана за вычетом 20px отступов по краям */
    width: calc(100vw - 20px);  /* Ширина: 100% ширины окна минус 20px (по 10px с каждой стороны) */
    height: calc(100vh - 20px); /* Высота: 100% высоты окна минус 20px (по 10px с каждой стороны) */
    
    /* Визуальные стили рамки устройства */
    border: 8px solid black;       /* Чёрная рамка толщиной 8 пикселей */
    border-radius: 36px;           /* Скруглённые углы для стилизации под смартфон */
    
    /* Внутренний отступ и расчёт размеров */
    padding: 10px;                 /* Внутренний отступ внутри phone-frame */
    box-sizing: border-box;        /* Включаем padding и border в расчёт итоговой ширины и высоты */
    
    /* Цвет фона устройства */
    background-color: #fff;        /* Белый фон внутри экрана телефона */
    
    /* Настройка сетки для размещения всех контейнеров */
    display: grid;                 /* Используем CSS Grid Layout для разметки элементов */
    
    /* Определяем строки сетки (9 контейнеров) */
    grid-template-rows: 
        90px                      /* Контейнер 1: Баннер (фиксированная высота 90px) */
        63px                      /* Контейнер 2, 3, 4: Горизонтальная линия (гибкая высота) */
        50px                      /* Контейнер 5: Имя собеседника (фиксированная высота 100px) */
        35px                      /* Контейнер 6: Описание (гибкая высота) */
        60px                      /* Контейнер 7: Кнопка вызова (гибкая высота) */
        auto                      /* Контейнер 8: Нижний блок (гибкая высота) */
        auto;                     /* Контейнер 9: Подвал (гибкая высота) */
    
    /* Расстояние между строками сетки */
    gap: 2px;                    /* Отступ между контейнерами 10px */
    
    /* Позиционирование и ограничение содержимого */
    position: relative;           /* Для позиционирования вложенных элементов */
/*    overflow: visible;  чтобы выпадающее меню не пряталось */

    max-width: 340px;
    overflow: hidden;
}



/* Общий контейнер для всех элементов */
.container {
/*
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
*/
}



/* Контейнер 1: Баннер */
.banner {
    background-color: #ffffff;   /*  фон */
    font-size: 18px;             
    text-align: center;          
    line-height: 90px;           /* Центрирование текста по вертикали */
    height: 90px;                /* Фиксированная высота баннера */
    position: relative;          /* Для позиционирования вложенного контейнера */
    padding: 0;
}

/* Вложенный контейнер внутри баннера */
.banner .sub-banner {
    width: 100%;                /* Полная ширина, совпадает с баннером */
    height: 60px;               /* Высота вложенного контейнера 60px */
    background-color: #b6e8ff;  /*  фон для теста */
    position: absolute;         /* Абсолютное позиционирование внутри баннера */
    bottom: 0;                  /*    Прижат к нижней границе баннера */
    text-align: center;         
    line-height: 60px;          /* Вертикальное центрирование текста */
}


/* Контейнер 2, 4, 3: Горизонтальная линия с выравниванием */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    margin-top: 5px;
}







/* Контейнер 2: Кнопка назад */
.back-button {
    width: 60px;
    height: 60px;
    font-size: 24px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid black;
    line-height: 60px;
    cursor: pointer;
}

/* Контейнер 3: Телефонный номер */
.phone-number {
    height: 60px;
    font-size: 20px;
    line-height: 60px;
    text-align: center;
    flex-grow: 1;
    text-align: center;
    font-style: italic;
    color: gray;
}

/* Контейнер 4: Переключатель языка */















/* Контейнер 5: Имя собеседника */
.contact-name {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    height: 40px;
    line-height: 70px;
    margin-top: 0; /* Убираем отступ сверху */
    padding-top: 0; /* Убираем внутренний отступ сверху */
}


/* Контейнер 6: Описание собеседника */
.contact-description {
    font-size: 12px;
    color: gray;
    text-align: center;
    padding: 3px;
/*    width: 60%;*/
}

/* Контейнер 7: Кнопка вызова */
.call-button {
    display: flex;
    flex-direction: column; /* Элементы располагаются вертикально */
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.call-button button {
    width: 60%;
    height: 60px;
    font-size: 24px;
    background-color: green;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Контейнер 8: Нижний блок */
.extra-info {
    width: 50%; /* Та же ширина, что и у кнопки ВЫЗОВ */
    height: 30px;
    border: 0px dashed #000; /* Для тестирования, можно убрать */
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto; /* Центрирование */
    margin-top: 0; /* Вплотную к кнопке ВЫЗОВ */
/*    border-radius: 10px;*/
        font-size: 12px;
    color: gray;
}


/* Контейнер 9: Подвал */
/* Основной контейнер футера */
.footer {
    text-align: center;
    height: 360px; 
    width: 100%;
    position: absolute;
    bottom: -200px;
    background-color: #f0f0f0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.2);
    transition: bottom 0.3s ease;
    padding: 10px;
    box-sizing: border-box;
    margin: 0 auto; /* Центрирование футера */
}

/* Верхняя полоска (неактивная) */
.inactive-bar {
    width: 80px;
    height: 10px;
    background-color: lightgray;
    border-radius: 10px;
    margin: 0 auto 20px;
}

/* Блок с тремя кнопками */
.button-container {
    display: flex;
    justify-content: center; /* Центрирование кнопок по горизонтали */
    align-items: center;
    gap: 20px; /* Равномерные отступы между кнопками */
    margin-bottom: 20px;
}

/* Квадратные кнопки */
.square-button {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    background-color: #c3ffc3;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    /* border: 1px solid black; */
    cursor: pointer;
    color: gray;
}

.round-button {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #ff8e8e; /*red;*/
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.round-button svg {
    width: 32px;
    height: 32px;
    transform: rotate(135deg); /* Перевёрнутая трубка */
}








/* Контейнер с активными ссылками */
.link-container {
    display: flex; /* Горизонтальное расположение блоков */
/*    justify-content: space-between;  Пространство между левым и правым блоками */
    align-items: center; 
    gap: 20px; 
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
    color: gray;
}

/* Левый блок с текстом: текст выровнен по левому краю */
.fut_l {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Выровнять текст по левому краю */
    gap: 15px;
    font-size: clamp(12px, 2vw, 18px);
    color: gray;
}

/* Правый блок с текстом: текст выровнен по правому краю */
.fut_p {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Выровнять текст по правому краю */
    gap: 15px;
    font-size: clamp(12px, 2vw, 18px);
    color: gray;
}

/* Вертикальная полоса */
.fut_line {
    width: 2px;
    height: 100%;
    background-color: gray;
    flex-shrink: 0;
}

/* Стили для ссылок */
.link-button {
    text-decoration: underline;
    color: gray;
    font-weight: bold;
}

/* Стили для баланса */
.balance {
    font-weight: bold;
    color: gray;
}


.milaf {
    text-decoration: underline;
    color: black;
    font-weight: bold;
    font-size: 10px;
    color: gray;
}





/* Нижний блок с пятью иконками */
.bottom-icons {
    display: flex;
    justify-content: center; /* Центрирование иконок */
    gap: 15px; /* Равномерные отступы между иконками */
    padding-top: 10px;
    border-top: 2px solid black;
    margin-top: 10px;
}

.icon-box {
    width: 50px;
    height: 50px;
    border: 1px solid black;
    border-radius: 10px;
}

/* Активный класс: футер полностью выехал */
.footer.active {
    bottom: 0;
}

/* Добавим стиль, когда футер возвращается */
.footer.returning {
    transition: bottom 0.5s ease-in; /* Плавный возврат */
}







.green {
    background-color: green !important;
    color: white !important;
}

.yellow {
    background-color: yellow !important;
    color: black !important;
}

.red {
    background-color: red !important;
    color: white !important;
}



#micContainer {
    width: 100%;
    display: flex;
    justify-content: center;
}
#micIcon {
    font-size: 24px;
    transition: color 0.3s, opacity 0.3s;

    width: 50px;
    height: 50px;
    border-radius: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
#micIcon.inactive {
    background-color: gray;
}
#micIcon.active {
    background-color: green;
}
#micIcon.disabled {
    background-color: red;
}
#micIcon.none {
    display: none;
}

#micImg {
    width: 25px;
    height: 25px;

    background-size: contain;
}

#micIcon.active > #micImg {
    background-image: url('https://milafone.eu/img/mic-on.svg');
}

#micIcon.inactive > #micImg, #micIcon.disabled > #micImg {
    background-image: url('https://milafone.eu/img/mic-slash.svg');
}


/* Общие стили для круглых кнопок */
.button-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease, background-color 0.3s ease;
    text-transform: uppercase;
}

/* Кнопка Домой (домик) */
.back-button {
    background-color: #a1d8f6;
    color: white;
}

.back-button svg {
    width: 28px;
    height: 28px;
    fill: #29475f;
}

.back-button:hover {
    background-color: #2c7fa1;
    transform: scale(1.1);
}









/*кнопка переключения языка*/
/* Обертка для корректного позиционирования */

/* Стили для кнопки переключения языка */
#language-dropdown {
/*    position: absolute;*/
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none; /* исправлено */
    position: absolute; top: 100%; right: 0;
    
    max-height: 400px;
    overflow: scroll;
}

#language-dropdown.active {
    display: block;  /* исправлено */
    opacity: 1;
    visibility: visible;
}

/* это настройка верхней части языка в разворотке */
.language-item > div:first-child {
    text-align: left;
    font-size: 22px;
}

/* это настройка нижней части языка в разворотке */
.language-item > div:last-child {
    text-align: left;
    font-size: 14px;
    color: gray;

    /* это тебе поиграться со шрифтами намётка */
    /* font-family: Arial;  */
    /* font-style: italic; */
}


#language-dropdown a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: black;
    cursor: pointer;
}

#language-dropdown a:hover {
    background: #f0f0f0;
}




/* Контейнер для кнопки и выпадающего меню */
.button-circle.language-switch {
    position: relative;
    cursor: pointer;
    padding: 10px;
    border: none;
    background: #f1f1f1;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-size: 18px;
}









.container_m_kontakt {
    width: 93%; /* Ограничиваем ширину */
    /* height: 80vh; Фиксированная высота контейнера */
    overflow: hidden; /* Отключаем общий скролл */
    margin: 20px auto;
    padding: 10px;
    border: 2px solid #ccc;
    border-radius: 10px;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    height: 46vh; /* Высота в процентах от родителя */
    overflow-y: auto; /* Скролл внутри */
}



/* Основной контейнер */
.container_kontakt {
    margin: 2px;
    padding: 10px 5px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.public-name-item {
    display: flex;
    justify-content: space-between;
}
.public-name-item > a {
    text-decoration: none;
}
.public-name-item-title {
    font-size: 18px;
    font-weight: bold;
}

/* Контейнер для описания контактов */
.contact-descr {
    /* overflow-y: auto;  Вертикальный скролл */
    overflow-wrap: break-word; /* Перенос длинных слов */
}

/* Название контактов */
.name_contact{
    font-size: 18px;
    font-weight: bold;
    background-color: #e9e9e9;
    padding: 8px;
    border-radius: 5px;
}

/* Стили для ссылок */
.link_name {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.link_name:hover {
    text-decoration: underline;
}



/* Контейнер со списком контактов */
.contacts-wrapper {
    height: 60%; /* Высота в процентах от родителя */
    overflow-y: auto; /* Скролл внутри */
    padding: 5px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 5px;
}









@media (max-width: 769px) {
    .phone-frame {
        width: calc(100vw - 20px); /* 100% ширины окна браузера минус 10px с каждой стороны */
        height: calc(100vh - 20px); /* 100% высоты окна браузера минус 10px с каждой стороны */
        margin: 10px; /* Внешний отступ 10px */
        padding: 10px;
        border: 8px solid black;
        border-radius: 36px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
        box-sizing: border-box;
        position: relative;
/*        overflow: hidden;*/
    }
}