/* ----- МОДАЛЬНЫЕ ОКНА ----- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 520px;
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

/* ФОРМЫ */
.form-group {
    margin-bottom: var(--space-lg);
    position: relative;
}

.form-input {
    width: 100%;
    padding: 18px 16px 8px 16px;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    outline: none;
    background: white;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.form-input:hover {
    border-color: #ccc;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.form-input.error {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

.form-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    pointer-events: none;
    background: white;
    padding: 0 4px;
    line-height: 1;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 500;
}

.form-input.error ~ .form-label {
    color: #e74c3c;
}

textarea.form-input {
    padding: 18px 16px 12px 16px;
    resize: vertical;
    min-height: 100px;
}

textarea.form-input ~ .form-label {
    top: 18px;
    transform: none;
}

textarea.form-input:focus ~ .form-label,
textarea.form-input:not(:placeholder-shown) ~ .form-label {
    top: 8px;
    transform: none;
    font-size: 0.7rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: var(--space-xl);
    cursor: pointer;
    padding: 8px 0;
}

.checkbox-group input {
    width: 20px;
    height: 20px;
    margin-top: 0;
    cursor: pointer;
    accent-color: var(--accent);
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.4;
}

.checkbox-group a {
    color: var(--accent);
    text-decoration: underline;
}

.close-modal-icon {
    position: absolute;
    top: 20px;
    right: 24px;
    background: var(--surface);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.close-modal-icon:hover {
    background: var(--border-light);
    transform: rotate(90deg);
}

.rating-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
}

.platform-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
}

/* ОКНА УСПЕХА */
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto var(--space-lg);
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-md);
}

.success-message {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

/* Уведомления */
.cookie-notice,
.promo-notice {
    animation: slideInUp 0.3s ease-out;
}

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

.cookie-notice a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-notice a:hover {
    text-decoration: none;
}

.promo-notice {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.promo-notice:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cookie-notice {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
    }
    
    .promo-notice {
        top: calc(var(--header-height) + 10px);
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 520px;
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal-icon {
    position: absolute;
    top: 20px;
    right: 24px;
    background: var(--surface);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.close-modal-icon:hover {
    background: var(--border-light);
    transform: rotate(90deg);
}

/* Уведомления */
.cookie-notice,
.promo-notice {
    animation: slideInUp 0.3s ease-out;
}

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

.cookie-notice a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-notice a:hover {
    text-decoration: none;
}

.promo-notice {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.promo-notice:hover {
    transform: translateY(-2px);
}

/* Платформы для отзывов */
.platform-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
}

/* Успех */
.success-icon {
    width: 64px;
    height: 64px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto var(--space-lg);
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-md);
}

.success-message {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .cookie-notice {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
    }
    
    .promo-notice {
        top: calc(var(--header-height) + 10px);
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        padding: var(--space-xl);
    }
    
    .success-title {
        font-size: 1.2rem;
    }
}

/* Платформы отзывов */
.platform-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
    margin-top: var(--space-xl);
}

.platform-buttons .btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.platform-buttons .btn-outline img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Акционное уведомление */
.promo-notice {
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: slideInRight 0.3s ease-out;
}

.promo-notice:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.cookie-notice {
    animation: slideInUp 0.3s ease-out;
}

/* Адаптив для уведомлений */
@media (max-width: 768px) {
    .promo-notice {
        top: calc(var(--header-height) + 10px);
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        padding: 12px 15px;
        font-size: 0.85rem;
    }
    
    .cookie-notice {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
        padding: 15px;
    }
}

/* Модальные окна */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 520px;
    padding: 40px;
    border-radius: 28px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal-icon {
    position: absolute;
    top: 20px;
    right: 24px;
    background: #F0F0F0;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.25s ease;
}

.close-modal-icon:hover {
    background: #E8E8E8;
    transform: rotate(90deg);
}

.success-icon {
    width: 64px;
    height: 64px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 24px;
}

.success-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.success-message {
    text-align: center;
    color: #5E5E5E;
    margin-bottom: 32px;
    line-height: 1.5;
}

.rating-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 32px;
}

.platform-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 32px;
}


/* Стили для обязательных полей */
.form-input[required] ~ .form-label:after {
    content: " *";
    color: #e74c3c;
}

.checkbox-group label:has(+ input[required]) {
    position: relative;
}

.checkbox-group label:has(+ input[required]):after {
    content: " *";
    color: #e74c3c;
}

/* Стили для ошибок */
.form-input.error {
    border-color: #e74c3c !important;
    background-color: #fff5f5 !important;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-input.error ~ .form-label {
    color: #e74c3c !important;
}

.checkbox-group.error {
    border: 1px solid #e74c3c;
    border-radius: 12px;
    padding: 8px 12px;
    background-color: #fff5f5;
    animation: shake 0.3s ease-in-out;
}

.checkbox-group.error label {
    color: #e74c3c;
}

/* Стили для сообщений об ошибках */
.wpcf7-response-output {
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.3s ease;
}

.wpcf7-not-valid-tip {
    font-size: 0.75rem;
    color: #e74c3c;
    margin-top: 5px;
    display: block;
}