/* Стилі для форми електронного звернення */

:root {
    --yellow: #FFCC04;
    --black: #191A1A;
    --blue: #2F6FC9;
    --light-blue: #E8EEF2;
    --red: #C13515;
    --grey: #767676;
    --white: #FFFFFF;
    --light-grey: #FAFAFA;
    --border-grey: #D6D6D6;
}

.feedback-form-container {
    /*max-width: 800px;*/
    margin: 0 auto;
    padding: 20px;
    /*background: var(--white);*/
    border-radius: 16px;
    /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
}

/* Секція попередження */
.notification-section {
    width: 100%;
    max-width: 1312px;
    padding: 16px;
    background: var(--white);
    overflow: hidden;
    border-radius: 16px;
    outline: 1px solid var(--yellow);
    outline-offset: -1px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 32px;
}

.notification-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    flex-direction: row;
}

.notification-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
}

.notification-text {
    flex: 1;
}

.notification-title {
    color: var(--black);
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
    margin-bottom: 8px;
}

.notification-description {
    color: var(--black);
    font-size: 16px;
    font-weight: 300;
    line-height: 28px;
}

.notification-link {
    color: var(--blue);
    text-decoration: none;
}

.notification-link:hover {
    text-decoration: underline;
}

/* Форма */
.form-section {
    width: 100%;
    max-width: 648px;
    margin: 0 auto;
}

.form-container {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Секції форми */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.section-title {
    color: var(--black);
    font-size: 24px;
    font-weight: 400;
    line-height: 28px;
    padding: 22px 0;
    border-bottom: 1px solid var(--black);
    margin-bottom: 24px;
}

/* Поля вводу */
.input-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    color: var(--black);
    font-size: 15px;
    font-weight: 400;
    line-height: 22px;
}

.input-label.required::after {
    content: "*";
    color: var(--red);
    margin-left: 2px;
}

.input-field {
    height: 54px;
    padding: 14px 12px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--light-blue);
    font-size: 15px;
    font-weight: 300;
    line-height: 22px;
    color: var(--black);
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--blue);
}

.input-field::placeholder {
    color: var(--grey);
}

/* Селекти */
.select-container {
    position: relative;
}

.select-field {
    height: 54px;
    padding: 14px 12px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--light-blue);
    font-size: 15px;
    font-weight: 300;
    line-height: 22px;
    color: var(--black);
    appearance: none;
    cursor: pointer;
    width: 100%;
}

.select-container::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--black);
    pointer-events: none;
}

/* Текстове поле */
.textarea-field {
    min-height: 257px;
    padding: 14px 12px;
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--light-blue);
    font-size: 15px;
    font-weight: 300;
    line-height: 22px;
    color: var(--black);
    resize: vertical;
    font-family: inherit;
}

/* Чекбокс */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.checkbox-field {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid var(--black);
    background: var(--black);
    cursor: pointer;
    position: relative;
}

.checkbox-field:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 14px;
    font-weight: bold;
}

.checkbox-label {
    color: var(--black);
    font-size: 12px;
    font-weight: 300;
    line-height: 16px;
    cursor: pointer;
}

/* Капча */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.captcha-input {
    float: left;
    width: 220px;
    height: 25px;
    margin-right: 10px;
    padding: 10px 2px;
    font-size: 20px;
    border: 1px solid var(--light-blue);
    border-radius: 4px;
}

.captcha-input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(47, 111, 201, 0.2);
}

/* Кнопка відправки */
.submit-button {
    width: 100%;
    padding: 14px 24px;
    background: var(--black);
    color: var(--white);
    border: 1px solid var(--black);
    border-radius: 40px;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background: #333;
}

/* Розташування полів */
.fields-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.field-full {
    width: 100%;
}

.field-half {
    flex: 1;
    min-width: 315px;
}

/* Повідомлення про помилки */
.error-message {
    color: var(--red);
    font-size: 14px;
    margin-top: 4px;
}

.success-message {
    color: #28a745;
    font-size: 14px;
    margin-top: 4px;
}

/* Адаптивність */
@media (max-width: 768px) {
    .feedback-form-container {
        max-width: 100%;
        padding: 16px;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .form-section {
        max-width: 100%;
        margin: 0;
    }
    
    .notification-section {
        max-width: 100%;
        padding: 16px;
        gap: 10px;
    }
    
    .notification-content {
        flex-direction: row;
        gap: 10px;
    }
    
    .fields-row {
        flex-direction: column;
    }
    
    .field-half {
        min-width: 100%;
    }
    
    .section-title {
        font-size: 20px;
        padding: 16px 0;
    }
    
    .input-field,
    .select-field,
    .textarea-field {
        height: 48px;
        font-size: 16px; /* Для кращого UX на мобільних */
    }
    
    .textarea-field {
        min-height: 200px;
    }
    
    .submit-button {
        padding: 16px 24px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .feedback-form-container {
        padding: 12px;
    }
    
    .notification-section {
        max-width: 100%;
        padding: 12px;
        gap: 8px;
    }
    
    .notification-content {
        gap: 8px;
    }
    
    .notification-title,
    .notification-description {
        font-size: 14px;
        line-height: 20px;
    }
    
    .section-title {
        font-size: 18px;
        padding: 12px 0;
    }
    
    .input-label {
        font-size: 14px;
    }
    
    .input-field,
    .select-field {
        height: 44px;
        font-size: 16px;
    }
}

/* Анімації */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container {
    animation: fadeIn 0.3s ease-out;
}

/* Додаткові стани для полів */
.input-container.focused .input-field,
.input-container.focused .select-field,
.input-container.focused .textarea-field {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px rgba(47, 111, 201, 0.2);
}

.select-field.has-value {
    color: var(--black);
}

.select-field:not(.has-value) {
    color: var(--grey);
}

/* Стани для капчі */
.captcha-container {
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .captcha-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .captcha-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Помилки мережі */
.network-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #f5c6cb;
}

/* Покращені стани для чекбоксів */
.checkbox-field:checked {
    background: var(--black);
}

.checkbox-field:checked::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 14px;
    font-weight: bold;
}

/* Покращені стилі для помилок */
.input-field.error,
.select-field.error,
.textarea-field.error {
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(193, 53, 21, 0.2);
}

.error-message {
    color: var(--red);
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

/* Покращені стилі для успіху */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #c3e6cb;
}

/* Покращені стилі для попередження */
.notification-section {
    position: relative;
    overflow: hidden;
}

.notification-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--yellow);
}

/* Покращені стилі для кнопки */
.submit-button:active {
    transform: translateY(1px);
}

.submit-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(25, 26, 26, 0.3);
}

/* Покращені стилі для мобільних пристроїв */
@media (max-width: 480px) {
    .notification-content {
        flex-direction: row;
        gap: 8px;
    }
    
    .notification-icon {
        flex-shrink: 0;
    }
    
    .section-title {
        font-size: 18px;
        padding: 12px 0;
    }
    
    .submit-button {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    .captcha-container {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .captcha-input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* Додаткові стилі для планшетів */
@media (min-width: 769px) and (max-width: 1024px) {
    .feedback-form-container {
        max-width: 90%;
        margin: 0 auto;
    }
    
    .form-section {
        max-width: 648px;
        margin: 0 auto;
    }
    
    .notification-section {
        max-width: 100%;
        padding: 16px;
        gap: 10px;
    }
    
    .fields-row {
        gap: 12px;
    }
    
    .field-half {
        min-width: calc(50% - 6px);
    }
}

/* Фокус стани */
.input-field:focus,
.select-field:focus,
.textarea-field:focus {
    box-shadow: 0 0 0 2px rgba(47, 111, 201, 0.2);
}

/* Ховер ефекти */
.input-field:hover,
.select-field:hover,
.textarea-field:hover {
    border-color: var(--blue);
}

/* Стани завантаження */
.submit-button:disabled {
    background: var(--grey);
    cursor: not-allowed;
}

.submit-button.loading {
    position: relative;
    color: transparent;
}

.submit-button.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid var(--white);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
} 