/* Базовые настройки для формы, чтобы не ломать стили сайта */
.form-container { 
    max-width: 900px; 
    margin: 0 auto; 
    background: #fff; 
    box-shadow: 0 0 20px rgba(0,0,0,0.1); 
    font-family: 'Montserrat', sans-serif;
    color: #2f2f2f;
}

/* HEADER */
.form-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; background: #222; color: #fff;
    /* Заменили желтые круги на зеленые градиенты */
    background-image: radial-gradient(circle at 10% 20%, rgba(13, 162, 96, 0.4) 0%, transparent 25%), 
                      radial-gradient(circle at 80% 80%, rgba(13, 162, 96, 0.3) 0%, transparent 30%);
    background-size: cover; position: relative; overflow: hidden;
    border-radius: 10px 10px 0 0;
}
.header-logo h1 { 
    font-size: 3.5rem; 
    color: #fff; /* Белый логотип вместо желтого */
    text-transform: uppercase; 
    font-weight: 900; 
    line-height: 0.9; 
    text-shadow: 2px 2px 0 #0da260, -2px -2px 0 #0da260, 2px -2px 0 #0da260, -2px 2px 0 #0da260; /* Зеленая обводка */
}
.header-logo p { 
    font-size: 0.9rem; 
    font-weight: 500; 
    margin-top: 10px; 
    letter-spacing: 1px; 
    color: #0da260; /* Зеленый подзаголовок */
}
.header-title h2 { 
    font-size: 2rem; 
    text-transform: uppercase; 
    font-weight: 700; 
    text-align: right; 
    line-height: 1.1; 
}

/* SECTIONS */
.form-section { margin-bottom: 15px; border: 1px solid #d9d9d9; border-radius: 8px; overflow: hidden; }
.section-header { 
    background-color: #2f2f2f; /* Темно-серый вместо черного, как в дизайне сайта */
    color: #fff; 
    padding: 12px 15px; 
    font-weight: 600; 
    font-size: 0.95rem; 
    text-transform: uppercase; 
    letter-spacing: 1px;
}
.section-body { padding: 20px; background: #fff; }

/* INPUTS */
.input-group { display: flex; align-items: flex-start; margin-bottom: 15px; }
.input-group label { 
    flex: 0 0 250px; 
    font-size: 0.9rem; 
    line-height: 1.2; 
    font-weight: 600; 
    padding-top: 10px; 
}
.input-group input, .input-group textarea, .input-group select {
    flex: 1; 
    padding: 10px; 
    border: 1px solid #cbcbcb; 
    border-radius: 8px; 
    font-family: 'Montserrat', sans-serif; 
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}
.input-group input:focus, .input-group textarea:focus, .input-group select:focus {
    border-color: #0da260;
}
.input-group textarea { resize: vertical; }
.input-group input[type="file"] { padding: 5px; background: #f9f9f9; border: 1px dashed #cbcbcb; }

.hint-text { font-size: 0.8rem; color: #666; margin-top: 5px; padding-left: 265px; }
.hint-text .red { color: #e63946; font-weight: bold; }

/* PARTICIPANTS */
.participants-list { margin-top: 15px; }
.participant-row {
    display: flex; gap: 15px; align-items: center; margin-bottom: 10px; padding: 15px; 
    background: #f9f9f9; 
    border-left: 4px solid #0da260; /* Зеленая полоска */
    border-radius: 0 8px 8px 0;
}
.participant-row input[type="text"], .participant-row input[type="date"], .participant-row select {
    flex: 1; padding: 10px; border: 1px solid #cbcbcb; border-radius: 6px; font-family: inherit;
}
.participant-row input[type="text"] { flex: 2; }
.remove-btn { 
    background: #e63946; color: #fff; border: none; border-radius: 6px; 
    width: 35px; height: 35px; cursor: pointer; font-weight: bold; 
    font-size: 1.2rem; display: flex; justify-content: center; align-items: center; 
    transition: background 0.3s;
}
.remove-btn:hover { background: #d62828; }

/* FOOTER & AGREE */
.form-footer { display: flex; justify-content: space-between; padding: 20px 15px; gap: 20px; border-top: 1px solid #eee; }
.footer-field { display: flex; align-items: center; gap: 10px; }
.footer-field label { font-size: 0.9rem; font-weight: 600; }
.footer-field input { padding: 10px; border: 1px solid #cbcbcb; border-radius: 6px; font-family: inherit; }

.agree-block { padding: 15px 20px; font-size: 0.85rem; line-height: 1.5; color: #333; }
.agree-block label { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 15px; cursor: pointer; }
.agree-block input[type="checkbox"] { 
    appearance: none;
    width: 20px; height: 20px; 
    border: 2px solid #0da260; 
    border-radius: 4px; 
    margin-top: 2px; 
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}
.agree-block input[type="checkbox"]:checked {
    background-color: #0da260;
}
.agree-block input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}
.agree-block a { color: #0da260; font-weight: 600; text-decoration: none; }
.agree-block a:hover { text-decoration: underline; }

/* Кнопка */
.submit-btn {
    display: block; width: calc(100% - 30px); 
    margin: 0 auto 20px;
    padding: 18px; 
    background-color: #0da260; 
    color: #fff;
    font-size: 1.2rem; 
    font-weight: 700; 
    border: none; 
    border-radius: 8px;
    cursor: pointer; 
    text-transform: uppercase; 
    transition: all 0.3s; 
    letter-spacing: 1px;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 4px 10px rgba(13, 162, 96, 0.2);
}
.submit-btn:hover { 
    background-color: #0b804c; 
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 162, 96, 0.3);
}

/* Адаптивность */
@media (max-width: 768px) {
    .form-header { flex-direction: column; text-align: center; gap: 15px; }
    .header-title h2 { text-align: center; }
    .input-group { flex-direction: column; align-items: flex-start; }
    .input-group label { flex: none; margin-bottom: 5px; padding-top: 0; }
    .input-group input, .input-group textarea, .input-group select { width: 100%; }
    .hint-text { padding-left: 0; }
    .form-footer { flex-direction: column; }
    .participant-row { flex-direction: column; align-items: stretch; gap: 10px; }
    .remove-btn { align-self: flex-end; }
}

/* Сообщение об успехе */
.success-message {
    text-align: center;
    padding: 50px 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    margin: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    animation: fadeInUp 0.6s ease-out;
}

.success-message h2 {
    color: #2f2f2f;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 700;
}

.success-message p {
    color: #555;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Иконка галочки (SVG) */
.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e8f5e9; /* Светло-зеленый фон */
    border-radius: 50%;
}

.success-icon svg {
    width: 50px;
    height: 50px;
    stroke: #0da260; /* Твой зеленый цвет */
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Анимация отрисовки галочки */
.success-icon svg circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.success-icon svg path {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

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

/* Сообщение об ошибке */
.error-message {
    background-color: #ffe6e6;
    color: #d8000c;
    padding: 15px;
    margin: 20px;
    border: 1px solid #d8000c;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}