/* Основные стили для формы записи в лагерь */
#campRegistrationApp {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
}

/* Заголовок */
.camp-registration-header {
    text-align: center;
    margin-bottom: 40px;
}

.camp-title {
    color: #007cba;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
}

.camp-subtitle {
    color: #666;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* Сетка лагерей */
.camps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Карточка лагеря */
.camp-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    border: 1px solid #eaeaea;
}

.camp-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.camp-card-inner { padding: 25px; }

.camp-full-badge {
    position: absolute;
    top: 15px; right: 15px;
    background: #ff4757;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.camp-header { margin-bottom: 20px; }

.camp-name {
    color: #2d3436;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
}

.camp-shift {
    display: inline-block;
    background: #e3f2fd;
    color: #007cba;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.camp-dates, .camp-location {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    color: #555;
    font-size: 15px;
}

.camp-dates i, .camp-location i {
    color: #007cba;
    margin-right: 10px;
    width: 20px;
}

/* Информация о местах */
.camp-places { margin: 25px 0; }

.places-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.places-count { font-weight: 700; }
.places-available { color: #2ed573; }
.places-unavailable { color: #ff4757; }

.places-progress {
    height: 6px;
    background: #f1f2f6;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2ed573, #1e90ff);
}

/* Кнопки */
.select-camp-btn {
    width: 100%;
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.select-camp-btn:hover { background: linear-gradient(135deg, #0069a1, #004870); }
.select-camp-btn:disabled { background: #95a5a6; cursor: not-allowed; }

/* Секция формы */
.registration-form-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.form-header h2 { margin: 0; }

.back-to-camps {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.back-to-camps:hover { text-decoration: underline; }

/* Карточка выбранного лагеря */
.selected-camp-card {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #007cba;
}

.camp-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.camp-info-header h3 { margin: 0; }

.camp-status {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.camp-status.available { background: #d4edda; color: #155724; }
.camp-status.unavailable { background: #f8d7da; color: #721c24; }

.camp-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.camp-detail-item { display: flex; flex-direction: column; }

.detail-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.detail-value { font-weight: 600; color: #2d3436; }

/* Форма */
.camp-registration-form { margin-top: 30px; }

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.form-section:last-child { border-bottom: none; }

.form-section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: #2d3436;
    font-size: 20px;
}

.section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    background: #007cba;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 18px;
}

/* Группы полей */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group { display: flex; flex-direction: column; }

.form-label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    display: flex;
    align-items: center;
    gap: 5px;
}

.required { color: #ff4757; }

.form-input, .form-select {
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s ease;
    background: white;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
}

/* Стили для родителей */
.parent-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.parent-section.optional {
    background: #fff;
    border: 1px dashed #dee2e6;
}

.parent-title {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
}

.required-parent { color: #dc3545; font-weight: normal; }
.optional-badge { background: #6c757d; color: white; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.parent-note { margin: -10px 0 15px; font-size: 13px; color: #6c757d; font-style: italic; }

.parents-separator {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

.parents-separator::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 1px;
    background: #dee2e6;
    z-index: 1;
}

.parents-separator span {
    background: white;
    padding: 0 15px;
    color: #6c757d;
    font-size: 14px;
    position: relative;
    z-index: 2;
}

.contact-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.form-help { font-size: 12px; color: #6c757d; margin-top: 4px; }

/* Стили для валидации - ТОЛЬКО ЗВЕЗДОЧКИ, БЕЗ КРАСНЫХ РАМОК */
.form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

/* Убираем красные рамки у полей с ошибками */
.form-input.error, .form-select.error {
    border-color: #ddd; /* Обычный цвет рамки */
}

/* Но показываем ошибку */
.form-error[style*="display: block"] + .form-input,
.form-error[style*="display: block"] + .form-select {
    border-color: #ddd; /* Все равно обычный цвет */
}

/* Акцент на звездочках - они и так красные через .required */

/* Согласие */
.agreement-section {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 3px;
    width: 18px; height: 18px;
}

.checkbox-label {
    font-size: 14px;
    line-height: 1.5;
    color: #444;
}

.checkbox-label a { color: #007cba; text-decoration: none; }
.checkbox-label a:hover { text-decoration: underline; }

/* Кнопка отправки */
.form-submit-section { text-align: center; margin-top: 40px; }

.submit-button {
    background: linear-gradient(135deg, #ff7a45, #ff5722);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    justify-content: center;
}

.submit-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff6b35, #e64a19);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,87,34,0.2);
}

.submit-button:disabled { background: #95a5a6; cursor: not-allowed; transform: none; }

.button-loader { display: inline-block; }

.loader {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.form-note {
    margin-top: 15px;
    color: #666;
    font-size: 13px;
}

/* Сообщения */
.camp-messages { margin-top: 30px; }

.message {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.message.error { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }

.success-button {
    margin-top: 15px;
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.success-button:hover { background: #218838; }

/* Состояние загрузки */
.loading-camps {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px; height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.no-camps-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-camps-message i { font-size: 60px; color: #ddd; margin-bottom: 20px; }

/* Анимации */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Адаптивность */
@media (max-width: 768px) {
    .camps-grid { grid-template-columns: 1fr; }
    .camp-title { font-size: 28px; }
    .camp-subtitle { font-size: 16px; }
    .registration-form-section { padding: 20px; }
    .form-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .form-row { grid-template-columns: 1fr; }
    .camp-details { grid-template-columns: 1fr; }
    .submit-button { width: 100%; }
}

@media (max-width: 480px) {
    #campRegistrationApp { padding: 0px; }
    .camp-card-inner { padding: 20px; }
    .camp-name { font-size: 18px; }
    .select-camp-btn { padding: 12px; font-size: 14px; }
    .form-section-title { font-size: 18px; }
    .section-number { width: 30px; height: 30px; font-size: 16px; }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .camp-card, .registration-form-section { background: #1e1e1e; border-color: #333; }
    .camp-name { color: #fff; }
    .camp-dates, .camp-location, .detail-label { color: #b0b0b0; }
    .detail-value, .form-label, .checkbox-label { color: #fff; }
    .form-input, .form-select { background: #2d2d2d; border-color: #444; color: #fff; }
    .selected-camp-card, .agreement-section { background: #2d2d2d; border-color: #444; }
    .parent-section { background: #2d2d2d; border-color: #444; }
    .parent-section.optional { background: #1e1e1e; }
    .parents-separator span { background: #1e1e1e; color: #b0b0b0; }
    .form-help { color: #b0b0b0; }
}

/* Стили для изображений лагерей */
.camp-image {
    height: 200px;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    margin: -25px -25px 20px -25px; /* Компенсируем padding карточки */
    position: relative;
    background: #f5f5f5;
}

.camp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.camp-card:hover .camp-image img {
    transform: scale(1.05);
}

.camp-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
}

.camp-image-placeholder i {
    font-size: 48px;
    opacity: 0.3;
}

.camp-image-placeholder span {
    position: absolute;
    font-size: 64px;
    font-weight: 700;
    opacity: 0.8;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Если нет фото, показываем заглушку */
.camp-card .camp-image-placeholder {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
}

/* Для карточек с пометкой "Нет мест" затемняем фото */
.camp-full .camp-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .camp-image {
        height: 150px;
    }
    
    .camp-image-placeholder i {
        font-size: 36px;
    }
    
    .camp-image-placeholder span {
        font-size: 48px;
    }
}

@media (max-width: 480px) {
    .camp-image {
        height: 120px;
        margin: -20px -20px 15px -20px;
    }
    
    .camp-image-placeholder i {
        font-size: 28px;
    }
    
    .camp-image-placeholder span {
        font-size: 36px;
    }
}

/* ===== УПЛОТНЕНИЕ ФОРМЫ ===== */

/* Уменьшаем отступы между секциями */
.form-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
}

/* Уменьшаем отступы между строками полей */
.form-row {
    gap: 12px;
    margin-bottom: 12px;
}

/* Уменьшаем отступы внутри группы полей */
.form-group {
    margin-bottom: 0;
}

/* Уменьшаем высоту полей ввода */
.form-input, .form-select {
    padding: 6px 8px;
    font-size: 14px;
}

/* Уменьшаем отступы у заголовков секций */
.form-section-title {
    margin-bottom: 15px;
    font-size: 18px;
}

.section-number {
    width: 28px;
    height: 28px;
    font-size: 14px;
}

/* Уплотняем карточку выбранного лагеря */
.selected-camp-card {
    padding: 15px;
    margin-bottom: 20px;
}

.camp-details {
    gap: 8px;
}

.camp-detail-item {
    margin-bottom: 2px;
}

/* Уплотняем секции родителей */
.parent-section {
    padding: 15px;
    margin-bottom: 12px;
}

.parent-title {
    margin: 0 0 10px 0;
    font-size: 15px;
}

.parent-note {
    margin: -5px 0 10px 0;
    font-size: 12px;
}

/* Уменьшаем отступы у блока с контактными данными */
.contact-section {
    margin-top: 15px;
    padding-top: 15px;
}

/* Уплотняем блок с согласиями */
.agreement-section {
    padding: 15px;
}

.checkbox-group {
    margin-bottom: 8px;
}

.checkbox-group:last-child {
    margin-bottom: 0;
}

.checkbox-label {
    font-size: 13px;
    line-height: 1.3;
}

/* Уменьшаем отступы у кнопки отправки */
.form-submit-section {
    margin-top: 25px;
}

.submit-button {
    padding: 12px 30px;
    font-size: 16px;
}

.form-note {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.3;
}

/* Уменьшаем отступы у сообщений об ошибках */
.form-error {
    font-size: 11px;
    margin-top: 2px;
}

.form-help {
    font-size: 11px;
    margin-top: 2px;
}

/* Уплотняем карточки лагерей на главной */
.camp-card-inner {
    padding: 15px;
}

.camp-image {
    height: 250px;
    margin: -15px -15px 15px -15px;
}

.camp-name {
    font-size: 18px;
    margin: 0 0 4px 0;
}

.camp-shift {
    padding: 2px 8px;
    font-size: 14px;
}

.camp-dates, .camp-location {
    margin-bottom: 6px;
    font-size: 14px;
}

.camp-places {
    margin: 12px 0;
}

.places-info {
    margin-bottom: 4px;
    font-size: 14px;
}

.select-camp-btn {
    padding: 10px;
    font-size: 14px;
}

/* Уменьшаем межстрочный интервал в тексте */
p, .detail-label, .detail-value, .form-label {
    line-height: 1.3;
}

/* Компактнее для мобильных устройств */
@media (max-width: 768px) {
    .form-section {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .form-row {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .camp-image {
        height: 300px;
    }
    
    .parent-section {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .camp-card-inner {
        padding: 12px;
    }
    
    .camp-image {
        height: 200px;
        margin: -12px -12px 10px -12px;
    }
    
    .form-section {
        margin-bottom: 15px;
        padding-bottom: 12px;
    }
    
    .selected-camp-card {
        padding: 10px;
    }
    
    .submit-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

.info-highlight {
    background: #ffc107;
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    margin-right: 8px;
    display: inline-block;
}

/* Информационный баннер */
.camp-info-banner {
    background: linear-gradient(135deg, #f0f9ff 0%, #e6f4ff 100%);
    border-left: 4px solid #007cba;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.1);
}

.info-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-icon {
    flex-shrink: 0;
    color: #007cba;
    font-size: 24px;
    line-height: 1;
}

.info-text {
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.5;
}

.info-text strong {
    color: #007cba;
    font-weight: 600;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .camp-info-banner {
        padding: 12px 15px;
        margin-bottom: 20px;
    }
    
    .info-icon {
        font-size: 20px;
    }
    
    .info-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .info-banner-content {
        gap: 10px;
    }
    
    .info-text {
        font-size: 13px;
    }
}

/* Блок проверки статуса */
.check-status-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

.check-status-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.check-status-header i {
    color: #007cba;
    font-size: 24px;
}

.check-status-header h3 {
    margin: 0;
    color: #2d3436;
    font-size: 18px;
    font-weight: 600;
}

.check-status-form {
    margin-bottom: 15px;
}

.check-status-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.check-status-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.check-status-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
}

.check-status-btn {
    background: linear-gradient(135deg, #007cba, #005a87);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.check-status-btn:hover {
    background: linear-gradient(135deg, #0069a1, #004870);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,124,186,0.2);
}

.check-status-btn i {
    font-size: 14px;
}

.check-status-help {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

/* Результат проверки */
.check-status-result {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.check-status-result.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.check-status-result.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.check-status-result.info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
}

.status-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    font-weight: 600;
    color: #495057;
}

.status-value {
    color: #212529;
}

.status-badge-small {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-small.pending {
    background: #fff3cd;
    color: #856404;
}

.status-badge-small.approved {
    background: #d4edda;
    color: #155724;
}

.status-badge-small.rejected {
    background: #f8d7da;
    color: #721c24;
}

.status-badge-small.cancelled {
    background: #e2e3e5;
    color: #383d41;
}

.check-status-close {
    margin-top: 15px;
    text-align: right;
}

.check-status-close-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    color: #666;
    font-size: 13px;
    transition: all 0.2s ease;
}

.check-status-close-btn:hover {
    background: #f8f9fa;
    border-color: #999;
}

/* Адаптивность */
@media (max-width: 768px) {
    .check-status-section {
        padding: 20px;
    }
    
    .check-status-input-group {
        flex-direction: column;
    }
    
    .check-status-btn {
        width: 100%;
        padding: 12px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .check-status-section {
        padding: 15px;
    }
    
    .check-status-header h3 {
        font-size: 16px;
    }
    
    .check-status-input {
        padding: 10px 12px;
        font-size: 14px;
    }
}

.spinner-small {
    width: 30px;
    height: 30px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}