/* =========================================
   Базовые настройки и переменные
   ========================================= */
:root {
    --primary-color: #2d7cff;
    --background-color: #f4f5f7;
    --card-bg: #ffffff;
    --text-main: #1a1a1a;
    --text-muted: #8e8e93;
    --success-color: #34c759;
    --error-color: #ff3b30;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

.container {
    padding: 20px;
    max-width: 760px; 
    margin: 40px auto;
    box-sizing: border-box;
}

/* =========================================
   Утилиты
   ========================================= */
.d-none { display: none !important; }
.text-center { text-align: center; }

/* =========================================
   Типографика и логотип
   ========================================= */
.address-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 24px 0;
    line-height: 1.2;
}

.brand-logo {
    display: block;
    max-width: 180px;
    height: auto;
    margin: 0 auto 24px auto;
}

/* =========================================
   Карточки и Формы
   ========================================= */
.card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
}

.payment-form { margin-top: 24px; }
.input-group { margin-bottom: 24px; }

.input-label {
    font-size: 15px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.text-input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 12px;
    border: 2px solid transparent;
    background-color: var(--background-color);
    font-size: 18px;
    font-weight: 500;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.text-input:focus {
    border-color: var(--primary-color);
    background-color: #fff;
}

.error-text { 
    color: var(--error-color); 
    font-size: 14px; 
    margin-top: 12px; 
    text-align: center;
    font-weight: 500;
}

/* =========================================
   Экраны статусов (Лоадер)
   ========================================= */
.status-container {
    text-align: center;
    padding-top: 40px;
}

.status-message {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0;
}

/* =========================================
   Маскоты (Кот и Робот) около кнопки
   ========================================= */
.mascots-btn-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    position: relative;
    padding: 0 5px; 
}

/* Базовый стиль картинок + плавность для рывка */
.mascot-img {
    width: 95px; 
    height: auto;
    object-fit: contain;
    pointer-events: none; 
    position: relative;
    z-index: 3; 
    transition: transform 0.15s ease-out, margin 0.15s ease-out; 
}

/* Анимации "дыхания/парения" */
@keyframes float-cat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-4px) rotate(2deg); }
}

@keyframes float-robot {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-5px) rotate(-2deg); }
}

/* Кот (слева) - Спокойное состояние */
.mascot-cat {
    margin-right: -5px; 
    transform-origin: center bottom;
    animation: float-cat 3s ease-in-out infinite; 
}

/* Робот (справа) - Спокойное состояние */
.mascot-robot {
    margin-left: -5px;
    transform-origin: center bottom;
    animation: float-robot 4s ease-in-out infinite; 
}

/* Состояние "УКУС" (Добавляется через JS при клике) */
.mascot-cat.biting {
    animation: none; /* Останавливаем парение */
    margin-right: -25px; /* Придвигаем к кнопке */
    transform: scale(1.08) rotate(6deg); 
}

.mascot-robot.biting {
    animation: none; /* Останавливаем парение */
    margin-left: -25px; /* Придвигаем к кнопке */
    transform: scale(1.08) rotate(-6deg); 
}

/* Кнопка */
.mascots-btn-wrapper .btn-primary {
    position: relative;
    z-index: 2; 
    flex: 1;
    padding: 18px 35px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-sizing: border-box;
    transition: transform 0.1s ease-in-out;
}

.mascots-btn-wrapper .btn-primary:active {
    transform: scale(0.97); 
}

.mascots-btn-wrapper .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}