/* ===== Глобальная модалка заявки (pcarbon.ru) ===== */

.pc-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.pc-modal.is-open { display: flex; }

.pc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(2px);
    animation: pcModalFade 200ms ease-out;
}

.pc-modal-panel {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.35);
    animation: pcModalScale 200ms ease-out;
    max-height: 90vh;
    overflow-y: auto;
}
@media (min-width: 640px) {
    .pc-modal-panel { padding: 2rem; }
}

.pc-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: #f5f5f4;
    color: #475569;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-family: Arial, sans-serif;
}
.pc-modal-close:hover { background: #e7e5e4; color: #0f172a; }

.pc-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}
.pc-modal-subtitle {
    color: #64748b;
    font-size: 0.9375rem;
    margin: 0 0 1.5rem 0;
    line-height: 1.4;
}

.pc-modal-form { display: flex; flex-direction: column; gap: 0.875rem; }
.pc-modal-field { display: flex; flex-direction: column; gap: 0.375rem; }
.pc-modal-label {
    font-size: 0.8125rem;
    color: #475569;
    font-weight: 500;
}
.pc-modal-hint { color: #94a3b8; font-weight: 400; }

/* Ошибка валидации под полем */
.pc-modal-error {
    font-size: 0.75rem;
    color: #dc2626;
    line-height: 1.3;
    margin-top: 0.125rem;
}
.pc-modal-field.has-error input,
.pc-modal-field.has-error textarea {
    border-color: #dc2626;
    background: #fef2f2;
}
.pc-modal-field.has-error input:focus,
.pc-modal-field.has-error textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.pc-modal-form input,
.pc-modal-form textarea {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    background: #fafaf9;
    color: #0f172a;
    font-size: 0.9375rem;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 150ms ease, background-color 150ms ease;
}
.pc-modal-form input:focus,
.pc-modal-form textarea:focus {
    outline: none;
    border-color: #0d9488;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.pc-modal-form textarea { resize: vertical; min-height: 80px; }

.pc-modal-submit {
    margin-top: 0.5rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: #0d9488;
    color: #ffffff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 150ms ease;
}
.pc-modal-submit:hover { background: #0b7f74; }

.pc-modal-policy {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
}
.pc-modal-policy a { color: #0d9488; text-decoration: underline; }

.pc-modal-success { text-align: center; padding: 1rem 0 0.5rem; }
.pc-modal-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pc-modal-success-icon svg { width: 32px; height: 32px; }

@keyframes pcModalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pcModalSlideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes pcModalScale {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
