/* =========================================
   Виджет бронирования — Усадьба Алмаз
   ========================================= */

/* --- Общий контейнер --- */
.almaz-booking {
    background: #fff;
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
}

.almaz-booking * {
    box-sizing: border-box;
}

/* --- Шаги (прогресс) --- */
.almaz-steps {
    display: flex;
    justify-content: center;
    gap: 0;
    margin-bottom: 50px;
    position: relative;
}

.almaz-step-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 600;
    color: #aaa;
    position: relative;
    transition: color 0.4s;
    cursor: default;
}

.almaz-step-indicator.active {
    color: #0F3F45;
}

.almaz-step-indicator.completed {
    color: #29B1C2;
}

.almaz-step-number {
    width: 36px;
    height: 36px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    transition: all 0.4s;
}

.almaz-step-indicator.active .almaz-step-number {
    border-color: #0F3F45;
    background: #0F3F45;
    color: #fff;
}

.almaz-step-indicator.completed .almaz-step-number {
    border-color: #29B1C2;
    background: #29B1C2;
    color: #fff;
}

.almaz-step-divider {
    width: 40px;
    height: 2px;
    background: #ddd;
    margin-top: 2px;
    transition: background 0.4s;
}

.almaz-step-divider.completed {
    background: #29B1C2;
}

/* --- Контент шагов --- */
.almaz-step-content {
    display: none;
    animation: almazFadeIn 0.4s ease;
}

.almaz-step-content.active {
    display: block;
}

@keyframes almazFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Шаг 1: Календарь --- */
.almaz-dates-wrapper {
    text-align: center;
}

.almaz-dates-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 400;
    color: #0F3F45;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.almaz-dates-subtitle {
    font-size: 16px;
    color: #888;
    margin-bottom: 30px;
}

.almaz-datepicker-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.almaz-date-field {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
}

.almaz-date-field label {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    font-weight: 600;
    color: #0F3F45;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.almaz-date-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #0F3F45;
    background: #fff;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
    color: #323232;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.almaz-date-input:focus {
    outline: none;
    border-color: #29B1C2;
    box-shadow: 0 0 0 3px rgba(41, 177, 194, 0.1);
}

.almaz-date-input::placeholder {
    color: #aaa;
}

.almaz-dates-btn {
    display: inline-block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    background: #0F3F45;
    border: none;
    cursor: pointer;
    padding: 16px 48px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
    margin-top: 10px;
}

.almaz-dates-btn:hover {
    background: #1a5a63;
    box-shadow: 0 4px 16px rgba(15, 63, 69, 0.25);
    transform: translateY(-1px);
}

.almaz-dates-btn:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* --- Шаг 2: Карточки объектов --- */
.almaz-rooms-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 400;
    color: #0F3F45;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.almaz-rooms-subtitle {
    text-align: center;
    font-size: 16px;
    color: #888;
    margin-bottom: 36px;
}

.almaz-rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.almaz-room-card {
    border: 1px solid #e5e5e5;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.almaz-room-card:hover {
    border-color: #29B1C2;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.almaz-room-card.selected {
    border-color: #0F3F45;
    border-width: 2px;
    box-shadow: 0 8px 30px rgba(15, 63, 69, 0.15);
}

.almaz-room-card.unavailable {
    opacity: 0.45;
    pointer-events: none;
    filter: grayscale(50%);
}

.almaz-room-card-gallery {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
}

.almaz-room-card-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.almaz-room-card-gallery .swiper {
    height: 100%;
}

.almaz-room-card-gallery .swiper-slide {
    height: 100%;
}

.almaz-room-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 63, 69, 0.85);
    color: #fff;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
    z-index: 1;
}

.almaz-room-card-body {
    padding: 20px;
}

.almaz-room-card-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    color: #0F3F45;
    margin-bottom: 8px;
}

.almaz-room-card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 14px;
}

.almaz-room-card-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.almaz-amenity-tag {
    font-size: 11px;
    color: #0F3F45;
    border: 1px solid #d9e8ea;
    padding: 3px 8px;
    background: #f0f8f9;
}

.almaz-room-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}

.almaz-room-price-per-night {
    font-size: 13px;
    color: #888;
}

.almaz-room-price-per-night span {
    font-size: 13px;
    color: #888;
}

.almaz-room-total-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 24px;
    font-weight: 700;
    color: #0F3F45;
}

.almaz-room-total-price span {
    font-size: 14px;
    font-weight: 400;
    color: #888;
    font-family: 'Inter', sans-serif;
}

.almaz-room-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.almaz-rooms-back {
    text-align: center;
    margin-top: 30px;
}

/* --- Шаг 3: Форма контактов --- */
.almaz-contact-form {
    max-width: 500px;
    margin: 0 auto;
}

.almaz-contact-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 400;
    color: #0F3F45;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.almaz-contact-subtitle {
    text-align: center;
    font-size: 16px;
    color: #888;
    margin-bottom: 30px;
}

.almaz-summary-card {
    background: #f8fafa;
    border: 1px solid #e5e5e5;
    padding: 20px;
    margin-bottom: 30px;
}

.almaz-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 15px;
}

.almaz-summary-label {
    color: #888;
}

.almaz-summary-value {
    font-weight: 600;
    color: #323232;
}

.almaz-summary-total {
    border-top: 1px solid #ddd;
    margin-top: 8px;
    padding-top: 12px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 700;
    color: #0F3F45;
}

.almaz-form-group {
    margin-bottom: 18px;
}

.almaz-form-group label {
    display: block;
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    font-weight: 600;
    color: #0F3F45;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.almaz-form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #0F3F45;
    background: #fff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: #323232;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.almaz-form-input:focus {
    outline: none;
    border-color: #29B1C2;
    box-shadow: 0 0 0 3px rgba(41, 177, 194, 0.1);
}

.almaz-form-input::placeholder {
    color: #bbb;
}

.almaz-form-textarea {
    height: 80px;
    resize: vertical;
}

.almaz-form-row {
    display: flex;
    gap: 16px;
}

.almaz-form-row .almaz-form-group {
    flex: 1;
}

.almaz-form-submit {
    width: 100%;
    padding: 16px;
    background: #0F3F45;
    color: #fff;
    border: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s, box-shadow 0.3s;
    margin-top: 10px;
}

.almaz-form-submit:hover {
    background: #1a5a63;
    box-shadow: 0 4px 16px rgba(15, 63, 69, 0.25);
}

.almaz-form-submit:disabled {
    background: #aaa;
    cursor: not-allowed;
}

.almaz-form-back {
    text-align: center;
    margin-top: 16px;
}

.almaz-back-link {
    font-size: 15px;
    color: #888;
    cursor: pointer;
    transition: color 0.3s;
    background: none;
    border: none;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.almaz-back-link:hover {
    color: #29B1C2;
}

/* --- Шаг 4: Подтверждение --- */
.almaz-success {
    text-align: center;
    padding: 40px 20px;
}

.almaz-success-icon {
    width: 72px;
    height: 72px;
    border: 3px solid #27AE60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: almazCheckPop 0.5s ease;
}

@keyframes almazCheckPop {
    0% { transform: scale(0); }
    60% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.almaz-success-icon svg {
    width: 36px;
    height: 36px;
    stroke: #27AE60;
    stroke-width: 3;
    fill: none;
}

.almaz-success-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 32px;
    font-weight: 400;
    color: #0F3F45;
    margin-bottom: 12px;
    letter-spacing: 0.05em;
}

.almaz-success-text {
    font-size: 16px;
    color: #666;
    max-width: 420px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.almaz-success-max {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.almaz-success-max:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.almaz-success-max img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
}

/* --- Загрузка --- */
.almaz-loading {
    text-align: center;
    padding: 40px;
    color: #888;
    font-size: 16px;
}

.almaz-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e5e5;
    border-top-color: #0F3F45;
    border-radius: 50%;
    animation: almazSpin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes almazSpin {
    to { transform: rotate(360deg); }
}

/* --- Ошибка --- */
.almaz-error {
    background: #fff5f5;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* --- Air Datepicker кастомизация --- */
.air-datepicker {
    --adp-accent-color: #0F3F45;
    --adp-color-secondary: #29B1C2;
    --adp-cell-border-radius: 0;
    --adp-day-name-color: #888;
    --adp-font-family: 'Inter', sans-serif;
    font-size: 14px;
    border: 1px solid #0F3F45;
    border-radius: 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.air-datepicker-cell.-selected-,
.air-datepicker-cell.-selected-.-focus- {
    background: #0F3F45;
    color: #fff;
}

.air-datepicker-cell.-in-range- {
    background: rgba(15, 63, 69, 0.08);
    color: #0F3F45;
}

.air-datepicker-cell.-range-from-,
.air-datepicker-cell.-range-to- {
    background: #0F3F45;
    color: #fff;
}

/* --- Медиа-запросы --- */
@media (max-width: 768px) {
    .almaz-steps {
        gap: 0;
        justify-content: center;
        padding: 0 10px;
    }

    .almaz-step-indicator {
        padding: 8px 6px;
        gap: 0;
    }

    .almaz-step-text {
        display: none;
    }

    .almaz-step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .almaz-step-divider {
        width: 20px;
    }

    .almaz-datepicker-container {
        flex-direction: column;
        align-items: center;
    }

    .almaz-date-field {
        max-width: 100%;
    }

    .almaz-rooms-grid {
        grid-template-columns: 1fr;
    }

    .almaz-form-row {
        flex-direction: column;
        gap: 0;
    }

    .almaz-dates-title,
    .almaz-rooms-title,
    .almaz-contact-title {
        font-size: 24px;
    }

    .almaz-room-total-price {
        font-size: 20px;
    }

    .almaz-success-title {
        font-size: 26px;
    }

    .almaz-success-text {
        font-size: 15px;
    }
}
