/* Продай своя имот - form styles */

:root {
    --psi-red: #9d1b2f;
    --psi-red-dark: #7c1525;
    --psi-radius: 999px;
}

/* ---------- Form ---------- */
.psi-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.psi-field {
    position: relative;
}

.psi-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    border-radius: var(--psi-radius);
    padding: 18px 26px;
    font-size: 17px;
    line-height: 1.3;
    color: #222;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    outline: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}

.psi-input::placeholder {
    color: #8a8a8a;
}

.psi-input:focus {
    border-color: var(--psi-red);
    box-shadow: 0 6px 22px rgba(157, 27, 47, 0.18);
}

.psi-field--textarea .psi-input {
    border-radius: 22px;
    min-height: 120px;
    resize: vertical;
}

/* Select chevron */
.psi-field--select {
    position: relative;
}
.psi-field--select::after {
    content: "";
    position: absolute;
    right: 28px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-right: 2px solid var(--psi-red);
    border-bottom: 2px solid var(--psi-red);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}
.psi-field--select .psi-input {
    padding-right: 50px;
    cursor: pointer;
}

/* Checkboxes (consent + any checkbox field) */
.psi-checkbox-label,
.psi-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 17px;
    color: #1d1d1d;
    cursor: pointer;
    line-height: 1.4;
    padding: 0 6px;
}

.psi-checkbox-label input,
.psi-consent-label input {
    width: 22px;
    height: 22px;
    margin-top: 1px;
    accent-color: var(--psi-red);
    flex: 0 0 auto;
}

.psi-consent-label a {
    color: var(--psi-red);
    text-decoration: underline;
}

/* Submit */
.psi-submit {
    width: 100%;
    border: 0;
    background: var(--psi-red);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 20px 24px;
    border-radius: var(--psi-radius);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}
.psi-submit:hover {
    background: var(--psi-red-dark);
}
.psi-submit:active {
    transform: translateY(1px);
}
.psi-submit[disabled] {
    opacity: 0.65;
    cursor: default;
}

/* Validation + messages */
.psi-input.psi-error {
    border-color: var(--psi-red);
    box-shadow: 0 0 0 2px rgba(157, 27, 47, 0.18);
}

.psi-message {
    display: none;
    border-radius: 14px;
    padding: 12px 18px;
    font-size: 15px;
}
.psi-message.psi-message--error {
    display: block;
    background: #fdecec;
    color: #9d1b2f;
}
.psi-message.psi-message--success {
    display: block;
    background: #eaf7ee;
    color: #1f7a3d;
}

/* reCAPTCHA */
.psi-field--recaptcha {
    display: flex;
    justify-content: flex-start;
}
.psi-field--recaptcha.psi-recaptcha--center {
    justify-content: center;
}
.psi-field--recaptcha.psi-recaptcha--right {
    justify-content: flex-end;
}
.psi-recaptcha-notice {
    display: block;
    font-size: 12px;
    line-height: 1.5;
    color: #8a8a8a;
    text-align: left;
}
.psi-recaptcha-notice.psi-recaptcha--center {
    text-align: center;
}
.psi-recaptcha-notice.psi-recaptcha--right {
    text-align: right;
}
.psi-recaptcha-notice a {
    color: var(--psi-red);
    text-decoration: underline;
}
.psi-field--recaptcha.psi-field--error {
    outline: 2px solid rgba(157, 27, 47, 0.5);
    outline-offset: 4px;
    border-radius: 6px;
}

/* Anti-spam honeypot — visually hidden but present in the DOM for bots. */
.psi-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- Success panel ---------- */
.psi-success-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    padding: 24px 8px 8px;
    animation: psi-fade-in 0.25s ease;
}
.psi-success-icon svg {
    width: 78px;
    height: 78px;
}
.psi-success-icon circle {
    stroke: #1f9d55;
    stroke-width: 2.5;
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    animation: psi-stroke 0.5s ease forwards;
}
.psi-success-icon path {
    stroke: #1f9d55;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: psi-stroke 0.35s 0.35s ease forwards;
}
.psi-success-text {
    margin: 0;
    font-size: 18px;
    line-height: 1.5;
    color: #1d1d1d;
    font-weight: 600;
}
.psi-success-again {
    border: 0;
    background: transparent;
    color: var(--psi-red);
    font-size: 15px;
    text-decoration: underline;
    cursor: pointer;
    padding: 6px 10px;
}
.psi-success-again:hover {
    color: var(--psi-red-dark);
}
@keyframes psi-stroke {
    to { stroke-dashoffset: 0; }
}
@keyframes psi-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* ---------- Modal ---------- */
.psi-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000;
}
.psi-modal.is-open {
    display: block;
}
.psi-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 10, 12, 0.55);
    backdrop-filter: blur(2px);
}
.psi-modal__dialog {
    position: relative;
    z-index: 1;
    margin: 6vh auto;
    width: min(560px, 92vw);
    max-height: 88vh;
    overflow: auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 240, 244, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    padding: 38px 34px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}
.psi-modal__title {
    margin: 0 0 22px;
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1d;
}
.psi-modal__close {
    position: absolute;
    top: 14px;
    right: 18px;
    border: 0;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    color: #6b6b6b;
    cursor: pointer;
}
.psi-modal__close:hover {
    color: var(--psi-red);
}

body.psi-modal-open {
    overflow: hidden;
}

/* Inline (shortcode) wrap */
.psi-form-wrap {
    width: min(560px, 100%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 240, 244, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 28px;
    padding: 34px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

@media (max-width: 480px) {
    .psi-modal__dialog,
    .psi-form-wrap {
        padding: 26px 20px;
    }
    .psi-input {
        font-size: 16px;
        padding: 16px 20px;
    }
}
