/* Sticky footer для страницы survey */
body.survey-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.survey-page .survey-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

body.survey-page .footer {
    flex-shrink: 0;
}

.survey-container {
max-width: 700px;
margin: 0 auto;
background: #ffffff;
border-radius: 16px;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
padding: 40px;
position: relative;
overflow: hidden;
margin: 4rem auto;

}

.survey-container::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
}

h1 {
font-size: 28px;
font-weight: 700;
margin: 0 0 12px 0;
color: #1a202c;
text-align: center;
}

.description {
font-size: 16px;
color: #718096;
text-align: center;
margin-bottom: 32px;
line-height: 1.5;
}

form {
display: flex;
flex-direction: column;
gap: 32px;
}

.question {
background: #f8fafc;
padding: 24px;
border-radius: 12px;
border-left: 4px solid #6366f1;
}

.question-title {
font-size: 18px;
font-weight: 700;
color: #2d3748;
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 8px;
}

.question-subtitle {
font-size: 14px;
color: #718096;
margin-bottom: 16px;
font-style: italic;
}

label {
font-weight: 500;
color: #4a5568;
margin-bottom: 8px;
display: block;
font-size: 14px;
}

select,
input[type="text"],
textarea {
width: 100%;
padding: 12px 16px;
border: 2px solid #e2e8f0;
border-radius: 8px;
font-size: 16px;
font-family: inherit;
transition: all 0.2s ease;
background: #ffffff;
box-sizing: border-box;
}

select:focus,
input[type="text"]:focus,
textarea:focus {
outline: none;
border-color: #6366f1;
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.radio-group,
.checkbox-group {
display: flex;
flex-direction: column;
gap: 12px;
}

.radio-option,
.checkbox-option {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 16px;
border: 2px solid #e2e8f0;
border-radius: 8px;
cursor: pointer;
transition: all 0.2s ease;
background: #ffffff;
}

.radio-option:hover,
.checkbox-option:hover {
border-color: #6366f1;
background: #f7fafc;
}

.radio-option input,
.checkbox-option input {
margin: 0;
width: auto;
}

.radio-option.selected,
.checkbox-option.selected {
border-color: #6366f1;
background: #edf2f7;
}

.nps-scale {
display: flex;
gap: 8px;
margin: 16px 0;
flex-wrap: wrap;
justify-content: center;
}

.nps-number {
width: 40px;
height: 40px;
border: 2px solid #e2e8f0;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s ease;
font-weight: 600;
background: #ffffff;
color: #1a202c;
}

.nps-number:hover {
border-color: #6366f1;
background: #f7fafc;
}

.nps-number.selected {
border-color: #6366f1;
background: #6366f1;
color: white;
}

.nps-labels {
display: flex;
justify-content: space-between;
font-size: 12px;
color: #718096;
margin-top: 8px;
}

textarea {
resize: vertical;
min-height: 80px;
}

.conditional {
display: none;
animation: fadeIn 0.3s ease;
}

.conditional.show {
display: block;
}

@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(-10px);
}

to {
opacity: 1;
transform: translateY(0);
}
}

.survey-button {
background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
color: white;
border: none;
padding: 20px 50px;
border-radius: 15px;
font-size: 18px;
font-weight: 700;
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
margin-top: 24px;
position: relative;
overflow: hidden;
text-transform: uppercase;
letter-spacing: 1.5px;
box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
align-self: center;
min-width: 250px;
}

.survey-button::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
transition: left 0.6s;
}

.survey-button:hover::before {
left: 100%;
}

.survey-button:hover {
transform: translateY(-4px) scale(1.05);
box-shadow: 0 15px 40px rgba(99, 102, 241, 0.6);
background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 50%, #c026d3 100%);
}

.survey-button:active {
transform: translateY(-2px) scale(1.02);
box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

.survey-button:disabled {
opacity: 0.7;
cursor: not-allowed;
transform: none;
box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.survey-button:disabled::before {
display: none;
}

.survey-success-message {
background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
color: white;
padding: 24px;
border-radius: 12px;
text-align: center;
font-weight: 600;
font-size: 18px;
display: none;
box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.survey-success-message > div {
margin-bottom: 0;
}

.error-message {
background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
color: white;
padding: 24px;
border-radius: 12px;
text-align: center;
font-weight: 600;
font-size: 18px;
display: none;
box-shadow: 0 8px 25px rgba(245, 101, 101, 0.3);
}

.loading {
display: inline-block;
width: 20px;
height: 20px;
border: 3px solid rgba(255, 255, 255, 0.3);
border-radius: 50%;
border-top-color: #ffffff;
animation: spin 1s ease-in-out infinite;
margin-right: 12px;
}

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

.pulse {
animation: pulse 2s infinite;
}

@keyframes pulse {
0% {
box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

50% {
box-shadow: 0 12px 35px rgba(99, 102, 241, 0.6);
}

100% {
box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}
}

@media (max-width: 640px) {
body {
padding: 16px;
}

.container {
padding: 24px;
}

h1 {
font-size: 24px;
}

.nps-scale {
gap: 4px;
}

.nps-number {
width: 35px;
height: 35px;
font-size: 14px;
}

.survey-button {
padding: 16px 32px;
font-size: 16px;
min-width: 200px;
}
}

@view-transition {
navigation: auto;
}

.error-container {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    color: #991b1b;
}

.error-message p {
    margin: 0 0 8px 0;
    font-weight: 600;
}

.error-message ul {
    margin: 0;
    padding-left: 20px;
}

.error-message li {
    margin: 4px 0;
}

/* Пометка обязательных полей */
.required {
    color: #ef4444;
    margin-left: 6px;
    font-weight: 700;
}

/* Скрываем блок общей ошибки по умолчанию (отдельный контейнер уже есть) */
#error-message {
    display: none;
}

.survey-back-button {
    margin-top: 24px;
    background: white;
    color: #48bb78;
    border: 2px solid white;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.survey-back-button:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.survey-back-button:active {
    transform: translateY(0);
}