/**
 * TP CTA Form — call-to-action section with form
 *
 * @package Technoproekt
 * @author  Kkalganov <https://kkalganov.com>
 */

/* ==========================================================================
   CTA Section
   ========================================================================== */

.tp-cta-section {
    padding: 40px 16px !important;
    background: var(--tp-cream) !important;
    scroll-margin-top: 100px;
}

/* CTA Container — mobile: 1 column, desktop: 2 columns */
.tp-cta__container.e-con-full,
.tp-cta__container > .e-con-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    align-items: stretch !important;
    background: var(--tp-white);
    padding: 0 !important;
}

/* Override Elementor gap/spacing variables on CTA container */
.tp-cta__container.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
    padding: 0 !important;
}

/* ==========================================================================
   CTA Info (left green panel)
   ========================================================================== */

.tp-cta__info {
    padding: 36px 24px !important;
    background: var(--tp-green-main) !important;
    color: var(--tp-white) !important;
    position: relative !important;
    overflow: hidden !important;
    align-self: stretch !important;
    height: 100% !important;
    min-height: 100% !important;
}

/* Green bg must cover e-con-inner too (prevents white strips) */
.tp-cta__info > .e-con-inner {
    background: var(--tp-green-main) !important;
}

.tp-cta__info.e-con-full,
.tp-cta__info > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

/* Override Elementor gap on info panel */
.tp-cta__info.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
}

/* Decorative circle — Elementor resets ::before on .e-con, so !important required */
.tp-cta__info::before {
    content: '' !important;
    position: absolute !important;
    top: -50% !important;
    right: -50% !important;
    width: 100% !important;
    height: 100% !important;
    border: 1px solid var(--tp-white-10) !important;
    border-radius: 50% !important;
    pointer-events: none !important;
    z-index: 0;
}

/* Force child containers to fill grid cells (override Elementor width: 50%) */
.tp-cta__container > .e-con-inner > .e-con,
.tp-cta__container.e-con-full > .e-con {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
}

.tp-cta__info h2 {
    font-family: 'Unbounded', system-ui, sans-serif;
    font-size: 18px !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin-bottom: 20px;
    position: relative;
    color: var(--tp-white) !important;
}

.tp-cta__info > p,
.tp-cta__info .elementor-text-editor p {
    font-size: 14px !important;
    color: var(--tp-white-90) !important;
    line-height: 1.7;
    margin-bottom: 24px;
    position: relative;
}

.tp-cta__list {
    list-style: none;
    position: relative;
    padding: 0;
    margin: 0;
}

.tp-cta__list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--tp-white) !important;
}

.tp-cta__list-marker {
    width: 8px;
    height: 8px;
    background: var(--tp-yellow);
    transform: rotate(45deg);
    flex-shrink: 0;
    margin-top: 6px;
}

/* ==========================================================================
   CTA Form (right panel)
   ========================================================================== */

.tp-cta__form {
    padding: 36px 24px !important;
    background: var(--tp-white) !important;
    align-self: stretch !important;
}

.tp-cta__form.e-con-full,
.tp-cta__form > .e-con-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

/* Override Elementor gap on form panel */
.tp-cta__form.e-con {
    --gap: 0px 0px !important;
    --widgets-spacing: 0px 0px !important;
}

.tp-cta__form h3 {
    font-family: 'Unbounded', system-ui, sans-serif;
    font-size: 16px !important;
    font-weight: 600;
    color: var(--tp-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

/* Privacy note — actual class from CF7 HTML */
.tp-cta__form .tp-cta__form-note {
    font-size: 12px !important;
    color: var(--tp-text-light) !important;
    text-align: center;
    line-height: 1.5;
    margin-top: 16px !important;
    margin-bottom: 0 !important;
}

/* Reduce spacing between widgets inside CTA form */
.tp-cta__form .elementor-widget {
    margin-bottom: 0 !important;
}

/* CTA acceptance checkbox */
.tp-cta__form .wpcf7-acceptance .wpcf7-list-item-label {
    font-size: 12px;
    color: var(--tp-text-light);
    text-transform: none;
}

/* ==========================================================================
   CF7 form inputs — unified styling
   ========================================================================== */

.tp-cta__form .wpcf7-form-control:not([type="submit"]):not(.wpcf7-radio) {
    width: 100% !important;
    padding: 16px !important;
    border: 2px solid var(--tp-cream-warm) !important;
    font-size: 15px !important;
    font-family: 'IBM Plex Sans', system-ui, sans-serif !important;
    transition: all 0.2s !important;
    background: var(--tp-cream) !important;
    color: var(--tp-text) !important;
    border-radius: 0 !important;
    outline: none !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.tp-cta__form .wpcf7-form-control:not([type="submit"]):not(.wpcf7-radio):focus {
    border-color: var(--tp-green-main) !important;
    background: var(--tp-white) !important;
}

/* Select dropdown — custom arrow
   Specificity 0-3-1 to beat the general rule 0-3-0 above */
.tp-cta__form select.wpcf7-form-control.wpcf7-select {
    background: var(--tp-cream) url("data:image/svg+xml,%3Csvg fill='none' stroke='%235A6858' stroke-width='2' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 16px center / 16px !important;
    padding-right: 44px !important;
    cursor: pointer !important;
}

/* Submit button — green, full width */
.tp-cta__form .wpcf7-submit {
    width: 100% !important;
    background: var(--tp-green-main) !important;
    color: var(--tp-white) !important;
    padding: 18px !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    font-family: 'Unbounded', system-ui, sans-serif !important;
    clip-path: polygon(0 0, 100% 0, 100% 70%, 95% 100%, 0 100%) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 0 !important;
}

.tp-cta__form .wpcf7-submit:hover {
    background: var(--tp-green-dark) !important;
}

/* Form row — 2 columns on desktop */
.tp-cta__form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 768px) {
    .tp-cta__form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (min-width: 769px) {
    .tp-cta-section {
        padding: 100px 40px !important;
    }

    .tp-cta__info {
        padding: 60px !important;
    }

    .tp-cta__form {
        padding: 60px !important;
    }

    .tp-cta__info h2 {
        font-size: 26px !important;
        word-break: normal;
        overflow-wrap: normal;
    }

    .tp-cta__info .elementor-text-editor p {
        font-size: 16px !important;
    }

    .tp-cta__list li {
        font-size: 15px;
    }

    .tp-cta__form h3 {
        font-size: 20px !important;
        margin-bottom: 24px;
    }
}

@media (min-width: 1025px) {
    .tp-cta__container.e-con-full,
    .tp-cta__container > .e-con-inner {
        grid-template-columns: 1fr 1fr !important;
        box-shadow: 0 40px 80px rgba(0, 0, 0, 0.08) !important;
    }
}
