/* ============================================
   ОСНОВНЫЕ СТИЛИ ФОРМЫ
   ============================================ */

.zf-container {
    position: relative;
    display: flex;
    margin: 0 auto;
    border-radius: 8px;
    background: #f9f9f9;
    min-height: 500px;
    overflow: hidden;
}

/* Левая часть */
.zf-left-wrapper {
    flex: 1;
    background: #242c59;
    background-image: url(/local/ico/Group.svg);
    background-position: 10% 20%;
    background-repeat: no-repeat;
    border-radius: 8px 0 0 8px;
    padding: 36px;
}

.zf-left {
    background: transparent;
    width: 100%;
    box-sizing: border-box;
}

/* Правая часть */
.zf-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.zf-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 8px 8px 0;
}

/* Фоновый элемент */
.zf-container::before {
    content: "";
    position: absolute;
    left: -100vw;
    right: -100vw;
    top: -100px;
    bottom: -100px;
    background-image: url(/local/ico/Group.svg);
    background-position: 40% 50%;
    background-repeat: no-repeat;
    z-index: -2;
    pointer-events: none;
}

/* ============================================
   ЗАГОЛОВКИ
   ============================================ */

.zf-header {
    margin-bottom: 25px;
}

.zf-title {
    font-weight: 300;
    font-size: 44px;
    color: #ffffff;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.zf-subtitle {
    font-weight: 550;
    font-size: 18px;
    color: #969ecb;
    margin: 0 0 20px 0;
    line-height: 1.4;
}

/* ============================================
   ПОЛЯ ФОРМЫ
   ============================================ */

.zf-fields {
    border: none;
    padding: 0;
    margin: 0 0 15px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.zf-field {
    flex: 0 0 calc(50% - 7.5px);
    margin-bottom: 0;
    box-sizing: border-box;
}

.zf-field-full {
    flex: 0 0 100%;
}

.zf-label {
    font-weight: 400;
    margin-bottom: 8px;
    font-size: 14px;
    color: #e2e6fc;
    display: block;
}

.zf-input-wrap {
    width: 100%;
}

.zf-input {
    height: 44px;
    padding: 0 15px;
    background: rgba(36, 44, 89, 1);
    color: #ffffff;
    border-radius: 4px;
    border: 1px solid rgba(52, 78, 155, 1);
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    transition: all 0.3s ease;
}

.zf-input::placeholder {
    color: #969ecb;
    opacity: 1;
}

.zf-input:focus {
    outline: none;
    border-color: #609f21;
}

.zf-input.error {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.zf-textarea {
    height: 80px;
    resize: vertical;
    padding-top: 12px;
    font-family: inherit;
}

.zf-star {
    color: #ff6b6b;
}

/* ============================================
   ФАЙЛОВОЕ ПОЛЕ
   ============================================ */

.zf-file-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    background: rgba(36, 44, 89, 1);
    border: 1px solid rgba(52, 78, 155, 1);
    border-radius: 4px;
    padding: 10px 15px;
    min-height: 54px;
    box-sizing: border-box;
}

.zf-file-row.error {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 5px rgba(255, 107, 107, 0.3);
}

.zf-file-label {
    background: rgba(52, 78, 155, 1);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.zf-file-label:hover {
    background: rgba(76, 129, 26, 1);
}

.zf-file-label-text {
    font-weight: 400;
    font-size: 14px;
    color: #ffffff;
    margin: 0;
    white-space: nowrap;
}

.zf-file-icon {
    width: 20px;
    height: 20px;
}

.zf-file-input-hidden {
    display: none;
}

.zf-file-name {
    font-size: 13px;
    color: #969ecb;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zf-file-name.active {
    color: #609f21;
}

/* ============================================
   ОШИБКИ ПОЛЕЙ
   ============================================ */

.zf-error-message {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    animation: zfFadeIn 0.2s ease;
}

.zf-error-message.show {
    display: block;
}

@keyframes zfFadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ЧЕКБОКС И КНОПКА
   ============================================ */

.zf-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.zf-consent {
    flex: 1;
    margin: 0;
    min-width: 200px;
}

.zf-consent-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.3;
}

.zf-consent-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0 10px 0 0 !important;
    cursor: pointer;
}

.zf-consent-checkbox.error {
    outline: 2px solid #ff6b6b;
    outline-offset: 2px;
}

.zf-consent-text {
    color: #e2e6fc;
    flex: 1;
}

.zf-consent-text.error {
    color: #ff6b6b;
}

.zf-consent-link {
    color: #609f21;
    text-decoration: none;
}

.zf-consent-link:hover {
    text-decoration: underline;
}

.zf-consent-error {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    display: none;
    animation: zfFadeIn 0.2s ease;
}

.zf-consent-error.show {
    display: block;
}

.zf-btn-wrap {
    flex-shrink: 0;
}

.zf-btn {
    background: #609f21;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.zf-btn:hover {
    background: #4a7d1a;
}

.zf-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   СООБЩЕНИЕ ОБ УСПЕХЕ
   ============================================ */

.zf-success {
    text-align: center;
    padding: 50px 20px;
}

.zf-success svg {
    margin-bottom: 20px;
}

.zf-success h3 {
    color: #ffffff !important;
    margin: 20px 0 10px 0;
    font-size: 28px;
    font-weight: 500;
}

.zf-success p {
    color: #969ecb;
    font-size: 16px;
    margin-top: 10px;
}

/* ============================================
   ОБЩАЯ ОШИБКА ФОРМЫ
   ============================================ */

.zf-form-error {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid #ff6b6b;
    border-radius: 4px;
    padding: 10px 15px;
    color: #ff6b6b;
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
    animation: zfFadeIn 0.2s ease;
}

.zf-form-error.show {
    display: block;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 992px) {
    .zf-left-wrapper { padding: 30px 25px; }
    .zf-title        { font-size: 36px; }
    .zf-subtitle     { font-size: 16px; }
}

@media (max-width: 768px) {
    .zf-container      { flex-direction: column; min-height: auto; }
    .zf-left-wrapper   { border-radius: 8px 8px 0 0; padding: 25px 20px; }
    .zf-right          { display: none; }
    .zf-fields         { gap: 12px; }
    .zf-field          { flex: 0 0 100%; }
    .zf-title          { font-size: 32px; }
    .zf-subtitle       { font-size: 15px; margin-bottom: 20px; }
    .zf-file-row       { flex-wrap: wrap; gap: 10px; padding: 12px; }
    .zf-file-label     { padding: 8px 16px; }
    .zf-file-name      { width: 100%; white-space: normal; word-break: break-all; }
    .zf-actions-row    { flex-direction: column; align-items: stretch; gap: 15px; }
    .zf-consent        { width: 100%; }
    .zf-btn-wrap       { width: 100%; }
    .zf-btn            { width: 100%; white-space: normal; padding: 12px 20px; }
    .zf-success        { padding: 40px 15px; }
    .zf-success h3     { font-size: 24px; }
    .zf-success p      { font-size: 14px; }
}

@media (max-width: 576px) {
    .zf-left-wrapper     { padding: 20px 15px; }
    .zf-title            { font-size: 28px; }
    .zf-subtitle         { font-size: 14px; }
    .zf-label            { font-size: 13px; }
    .zf-input            { padding: 12px; font-size: 13px; }
    .zf-file-row         { padding: 10px; }
    .zf-file-label-text  { font-size: 13px; }
    .zf-consent-text     { font-size: 11px; }
    .zf-btn              { font-size: 13px; padding: 10px 15px; }
}

@media (max-width: 768px) and (orientation: landscape) {
    .zf-container    { min-height: auto; }
    .zf-left-wrapper { padding: 20px; }
    .zf-title        { font-size: 28px; }
    .zf-fields       { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .zf-file-row     { flex-wrap: nowrap; }
    .zf-file-name    { white-space: nowrap; }
    .zf-actions-row  { flex-direction: row; }
}

@media (min-width: 1400px) {
    .zf-left-wrapper { padding: 45px; }
    .zf-title        { font-size: 52px; }
    .zf-subtitle     { font-size: 20px; }
    .zf-input        { padding: 18px; font-size: 16px; }
    .zf-btn          { padding: 14px 40px; font-size: 16px; }
    .zf-file-row     { padding: 12px 18px; }
}

@media (hover: none) and (pointer: coarse) {
    .zf-file-label:hover { background: rgba(52, 78, 155, 1); }
    .zf-btn:hover        { background: #609f21; }
}

@media (prefers-reduced-motion: reduce) {
    .zf-success { animation: none; transition: none; }
}