/**
 * Post Importer — Gate overlay styles
 *
 * Modal that appears when a visitor clicks a Download button marked with
 * data-gated="true" and doesn't yet have the `plow_gated` cookie.
 */

.plow-gate-overlay {
    position: fixed;
    inset: 0;
    background: rgba(35, 47, 62, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 1;
    transition: opacity 0.15s ease;
}
.plow-gate-overlay[hidden] {
    display: none;
}
body.plow-gate-open {
    overflow: hidden; /* prevent background scroll while modal open */
}

.plow-gate-modal {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    padding: 36px 36px 32px;
    max-width: 440px;
    width: 100%;
    position: relative;
    animation: plow-gate-in 0.2s ease-out;
}

@keyframes plow-gate-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.plow-gate-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 28px;
    line-height: 1;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.15s ease;
}
.plow-gate-close:hover,
.plow-gate-close:focus-visible {
    color: #505050;
}

.plow-gate-modal h3 {
    margin: 0 0 8px;
    font-size: 1.4rem;
    color: #232F3E;
    font-weight: 700;
}

.plow-gate-intro {
    margin: 0 0 22px;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

.plow-gate-form .plow-gate-field {
    display: block;
    margin-bottom: 14px;
}
.plow-gate-form .plow-gate-field > span {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #505050;
    margin-bottom: 6px;
}
.plow-gate-form .plow-gate-field > span > em {
    color: #43AB49;
    font-style: normal;
    margin-left: 2px;
}

.plow-gate-form input[type="email"],
.plow-gate-form input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid #d0d4d0;
    border-radius: 4px;
    background: #ffffff;
    color: #232F3E;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.plow-gate-form input[type="email"]:focus,
.plow-gate-form input[type="text"]:focus {
    outline: none;
    border-color: #43AB49;
    box-shadow: 0 0 0 3px rgba(67, 171, 73, 0.15);
}

.plow-gate-submit {
    width: 100%;
    margin-top: 6px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 700;
    background: #43AB49;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}
.plow-gate-submit:hover:not(:disabled),
.plow-gate-submit:focus-visible:not(:disabled) {
    background: #3b9940;
}
.plow-gate-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.plow-gate-error {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff3f3;
    border: 1px solid #f5c2c2;
    border-radius: 4px;
    color: #9e2a2a;
    font-size: 0.9rem;
}

/* Small screens: let the modal breathe */
@media (max-width: 520px) {
    .plow-gate-modal {
        padding: 28px 22px 24px;
    }
    .plow-gate-modal h3 {
        font-size: 1.2rem;
    }
}
