/* ===============================================
   RF MasterClass Booking - GOLD EDITION v3.0
   (Золотой стиль + Анимации + Премиум UI)
   =============================================== */

:root {
    /* ЗОЛОТАЯ ПАЛИТРА */
    --rf-primary: #C19A6B;        /* Основной золотой */
    --rf-primary-dark: #A98454;   /* Темно-золотой (для градиентов) */
    --rf-secondary: #2C2C2C;      /* Темный текст */
    
    /* СТАТУСЫ */
    --rf-success: #6B8E23;        /* Оливковый */
    --rf-warning: #DAA520;        /* Золотарник */
    --rf-danger: #CD5C5C;         /* Приглушенный красный */
    
    /* НЕЙТРАЛЬНЫЕ */
    --rf-gray-50: #F9F7F4;        /* Бежевый фон */
    --rf-gray-100: #F3F0EB;
    --rf-gray-200: #E5E0D8;
    --rf-gray-300: #D1CEC7;
    --rf-gray-600: #6B6B6B;
    --rf-gray-700: #4A4A4A;
    --rf-gray-900: #1A1A1A;
    
    --rf-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --rf-shadow: 0 10px 30px rgba(193, 154, 107, 0.15);
}

* { box-sizing: border-box; }

/* ===============================================
   Контейнер календаря
   =============================================== */

.rf-booking-calendar {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    font-family: 'Inter', sans-serif;
}

.rf-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 24px;
    /* ЗОЛОТОЙ ГРАДИЕНТ */
    background: linear-gradient(135deg, var(--rf-primary) 0%, var(--rf-primary-dark) 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(193, 154, 107, 0.3);
    position: relative;
    overflow: hidden;
    /* Анимация появления */
    animation: rf-slide-down 0.5s ease-out;
}

/* Блик на фоне шапки */
.rf-calendar-header::after {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

.rf-calendar-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: 'Playfair Display', serif;
    position: relative; z-index: 2;
}

.rf-calendar-nav {
    display: flex;
    gap: 10px;
    position: relative; z-index: 2;
}

.rf-calendar-nav button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--rf-transition);
    backdrop-filter: blur(5px);
    font-size: 20px;
    padding-bottom: 3px;
}

.rf-calendar-nav button:hover {
    background: white;
    color: var(--rf-primary-dark);
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.rf-calendar-nav button:active { transform: scale(0.95); }

/* ===============================================
   Сетка событий
   =============================================== */

.rf-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 30px;
    /* Анимация появления сетки */
    animation: rf-fade-in 0.6s ease-out;
}

.rf-event-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.03);
    transition: var(--rf-transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--rf-gray-200);
}

/* Цветная полоска сверху */
.rf-event-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--rf-primary), var(--rf-primary-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--rf-transition);
}

.rf-event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(193, 154, 107, 0.15); /* Золотая тень */
    border-color: var(--rf-primary);
}

.rf-event-card:hover::before { transform: scaleX(1); }

.rf-event-card.rf-sold-out {
    opacity: 0.6;
    pointer-events: none;
    background: #fafafa;
}

.rf-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.rf-event-theme {
    font-size: 20px;
    font-weight: 700;
    color: var(--rf-gray-900);
    margin: 0 0 8px 0;
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
}

.rf-event-date {
    font-size: 14px;
    color: var(--rf-gray-600);
    display: flex; align-items: center; gap: 6px;
    font-weight: 500;
}

.rf-event-date::before { content: '📅'; }

.rf-event-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--rf-primary);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
}

/* ИНДИКАТОР МЕСТ (с пульсацией) */
.rf-event-availability {
    display: flex; align-items: center; gap: 12px;
    margin: 16px 0; padding: 12px;
    background: var(--rf-gray-50);
    border-radius: 10px;
}

.rf-availability-indicator {
    width: 10px; height: 10px;
    border-radius: 50%;
    /* Анимация пульсации */
    animation: rf-pulse 2s ease-in-out infinite;
}

.rf-availability-indicator.rf-available {
    background: var(--rf-success);
    box-shadow: 0 0 0 0 rgba(107, 142, 35, 0.4);
}

.rf-availability-indicator.rf-limited {
    background: var(--rf-warning);
    box-shadow: 0 0 0 0 rgba(218, 165, 32, 0.4);
}

.rf-availability-indicator.rf-sold-out {
    background: #999;
    animation: none;
}

.rf-availability-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--rf-gray-700);
}

.rf-event-actions { margin-top: 20px; }

/* КНОПКИ */
.rf-btn {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--rf-transition);
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rf-btn-primary {
    /* ЗОЛОТОЙ ГРАДИЕНТ */
    background: linear-gradient(135deg, var(--rf-primary) 0%, var(--rf-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(193, 154, 107, 0.3);
}

.rf-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(193, 154, 107, 0.4);
}

.rf-btn-primary:active { transform: translateY(0); }

.rf-btn-disabled {
    background: var(--rf-gray-300);
    color: var(--rf-gray-600);
    cursor: not-allowed;
    box-shadow: none;
}

/* ===============================================
   Модальное окно (Анимация Slide Up)
   =============================================== */

.rf-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: rf-fade-in 0.3s ease;
}

.rf-modal {
    background: white;
    border-radius: 16px;
    max-width: 480px; width: 100%; max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    animation: rf-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.rf-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--rf-gray-200);
    display: flex; justify-content: space-between; align-items: center;
    /* ЗОЛОТАЯ ШАПКА */
    background: linear-gradient(135deg, var(--rf-primary) 0%, var(--rf-primary-dark) 100%);
    color: white;
    border-radius: 16px 16px 0 0;
}

.rf-modal-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.rf-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px; height: 32px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--rf-transition);
    font-size: 20px;
    padding-bottom: 3px;
}

.rf-modal-close:hover { background: rgba(255, 255, 255, 0.4); }

.rf-modal-body { padding: 24px; }

.rf-form-group { margin-bottom: 20px; }

.rf-form-label {
    display: block; font-weight: 600;
    color: var(--rf-gray-700);
    margin-bottom: 8px;
    font-size: 13px; text-transform: uppercase;
}

.rf-form-label .rf-required { color: var(--rf-danger); margin-left: 4px; }

.rf-form-input, .rf-form-select {
    width: 100%; padding: 12px 16px;
    border: 1px solid var(--rf-gray-300);
    border-radius: 8px;
    font-size: 16px;
    transition: var(--rf-transition);
    font-family: 'Inter', sans-serif;
    background-color: var(--rf-gray-50);
}

.rf-form-input:focus, .rf-form-select:focus {
    outline: none;
    border-color: var(--rf-primary);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(193, 154, 107, 0.2);
}

.rf-form-input.rf-error { border-color: var(--rf-danger); }
.rf-error-message { color: var(--rf-danger); font-size: 13px; margin-top: 6px; }

.rf-event-summary {
    background: var(--rf-gray-50);
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid var(--rf-gray-200);
}

.rf-summary-row {
    display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px;
}
.rf-summary-label { color: var(--rf-gray-600); }
.rf-summary-value { font-weight: 600; color: var(--rf-gray-900); }

.rf-summary-total {
    padding-top: 12px;
    border-top: 1px solid var(--rf-gray-300);
    margin-top: 12px;
}
.rf-summary-total .rf-summary-value { font-size: 20px; color: var(--rf-primary); }

/* ===============================================
   Загрузка и Анимации
   =============================================== */

.rf-loading, .rf-empty-state {
    text-align: center; padding: 60px 20px;
}

.rf-spinner {
    display: inline-block;
    width: 48px; height: 48px;
    border: 3px solid var(--rf-gray-200);
    border-top-color: var(--rf-primary);
    border-radius: 50%;
    animation: rf-spin 0.8s linear infinite;
}

.rf-loading-text, .rf-empty-state-text {
    margin-top: 16px;
    color: var(--rf-gray-600);
    font-size: 16px;
}

.rf-empty-state-icon {
    font-size: 64px; margin-bottom: 16px; opacity: 0.3; filter: grayscale(100%);
}

/* KEYFRAMES */

@keyframes rf-pulse {
    0% { box-shadow: 0 0 0 0 rgba(218, 165, 32, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(218, 165, 32, 0); }
    100% { box-shadow: 0 0 0 0 rgba(218, 165, 32, 0); }
}

@keyframes rf-spin { to { transform: rotate(360deg); } }

@keyframes rf-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes rf-slide-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes rf-slide-up {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===============================================
   Адаптивность
   =============================================== */

@media (max-width: 768px) {
    .rf-calendar-header {
        flex-direction: column; gap: 16px; text-align: center;
    }
    .rf-events-grid { grid-template-columns: 1fr; gap: 16px; }
    .rf-modal {
        margin: 0;
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
    }
    .rf-modal-overlay { align-items: flex-end; padding: 0; }
}