/* ==================================
   ПЕРЕМЕННЫЕ ДЛЯ ЛЕГКОЙ НАСТРОЙКИ
   ================================== */
:root {
    /* ЗАМЕНИТЕ ЭТОТ ЦВЕТ, когда получите HEX-код от дизайнера */
    --primary-color: #008080; /* Примерный бирюзовый цвет */
    
    --background-color: #f4f6f8;
    --card-bg-color: #ffffff;
    --text-color: #111;
    --text-light-color: #666;
    --border-color: #e0e0e0;
    --font-family: 'Roboto', sans-serif;
}

/* ==================================
   Базовые стили и структура
   ================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: #ccc;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    color: var(--text-color);
}

.mobile-container {
    width: 100%;
    max-width: 420px;
    height: 100vh;
    max-height: 900px;
    background-color: var(--background-color);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.screen {
    display: none;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 1.5rem;
}

.screen.active {
    display: flex;
}

main {
    flex-grow: 1;
}

.screen-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    position: relative;
    height: 40px;
}

.screen-header-transparent {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    margin: 0;
}

.screen-header h2 {
    flex-grow: 1;
    text-align: center;
}

.back-btn {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ==================================
   Компоненты (кнопки, инпуты и т.д.)
   ================================== */
.btn {
    display: block;
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    margin-bottom: 0.75rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary {
    background-color: var(--card-bg-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}
.btn-block {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    width: auto;
}
.btn[disabled] {
    background-color: #e0e0e0;
    cursor: not-allowed;
    color: #999;
}

input[type="text"], input[type="date"], input[type="time"] {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 1.8rem; font-weight: 700; }
.subtitle { color: var(--text-light-color); margin-bottom: 2rem; }

/* ==================================
   Стили для конкретных экранов
   ================================== */

/* --- Экран Welcome --- */
#screen-welcome .welcome-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
}
.logo-placeholder {
    width: 70px;
    height: 70px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 2rem;
}
#screen-welcome .button-group { width: 100%; margin-top: 2rem; }
#screen-welcome p { font-size: 1.2rem; color: var(--text-light-color); }
.skip-link { margin-top: 1rem; color: var(--text-light-color); text-decoration: none; }

/* --- Экран Листинга --- */
.listing-card {
    background: var(--card-bg-color);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    cursor: pointer;
}
.listing-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.listing-card-content {
    padding: 1rem;
}
.listing-card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}
.listing-card-content .price {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.listing-card-content .availability {
    color: var(--primary-color);
    font-weight: 500;
}

/* --- Экран Деталей --- */
#screen-details { padding: 0; }
#details-container img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.details-content {
    padding: 1.5rem;
    border-radius: 20px 20px 0 0;
    background: var(--background-color);
    transform: translateY(-20px);
}
.details-content h2 { margin-bottom: 0.5rem; }
.price-info { display: flex; gap: 1.5rem; margin: 1rem 0; }
.price-info span { font-size: 1.2rem; font-weight: 500; }
.availability-tag {
    background-color: #e0f2f1;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 1.5rem;
}
.map-placeholder {
    height: 150px;
    background: #e0e0e0;
    border-radius: 12px;
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
}
.details-buttons {
    padding: 1.5rem;
    background: var(--card-bg-color);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-top: 1px solid var(--border-color);
}

/* --- Экран выбора времени --- */
.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}
.time-slot {
    padding: 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg-color);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
}
.time-slot:disabled {
    background: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
}
.time-slot.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}
.total-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--card-bg-color);
    border-radius: 12px;
}

/* --- Экран подтверждения --- */
.confirmation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
    height: 100%;
}
.checkmark-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #e0f2f1;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}
.confirmation-details {
    width: 100%;
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 1rem;
    margin: 1.5rem 0;
}
.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}
.detail-item:last-child { border-bottom: none; }
.detail-item span { color: var(--text-light-color); }
.add-to-calendar-link { margin-bottom: 2rem; display: block; }

/* --- Экран "Ничего не найдено" --- */
.centered-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100%;
}
.centered-content p {
    margin: 1rem 0 2rem;
    color: var(--text-light-color);
}

/* --- Модальное окно фильтров --- */
.modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 100;
}
.modal-content {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    animation: slideUp 0.3s ease-out;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.close-btn { background: none; border: none; font-size: 1.8rem; cursor: pointer; }
.filter-group { margin-bottom: 1.5rem; }
.filter-group h4 { margin-bottom: 1rem; }
.filter-group label { display: block; margin-bottom: 0.5rem; }
