/* PromptCloud Sync — lease form front-end
   Accent colour comes from --avi-accent (set in the plugin settings).
   All selectors are documented in the plugin under the Shortcodes tab. */

.avi-lease-form {
    font-family: 'Livvic', sans-serif;
    max-width: 456px;
}

.avi-lease-field { margin-bottom: 16px; }

.avi-lease-label {
    display: block;
    font-family: 'Livvic', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 8px;
}

.avi-lease-form select.avi-lease-term,
.avi-lease-form input.avi-lease-down,
.avi-lease-form input.avi-lease-balloon {
    width: 100%;
    box-sizing: border-box;
    height: 46px;
    min-height: 0;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 17px;
    line-height: 1.4;
    color: #1d2327;
    background-color: #f2f2f3;
    border: 1px solid transparent;
    border-radius: 10px;
    box-shadow: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.avi-lease-term {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23555' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.avi-lease-form select.avi-lease-term:focus,
.avi-lease-form input.avi-lease-down:focus,
.avi-lease-form input.avi-lease-balloon:focus {
    border-color: var(--avi-accent, #FE6631);
    background-color: #f2f2f3;
    box-shadow: none;
    outline: none;
}

.avi-lease-price {
    margin: 20px 0;
    font-family: 'Livvic', sans-serif;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    color: var(--avi-accent, #FE6631);
}

.avi-lease-price-currency { font-size: 18px; vertical-align: super; margin-right: 3px; color: #353535; font-weight: 400; }
.avi-lease-price-amount   { font-size: 36px; }
.avi-lease-price-suffix   { font-size: 36px; color: #353535; font-weight: 400;}

.avi-lease-submit {
    display: block;
    width: 100%;
    padding: 16px 26px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    color: #fff;
    background: var(--avi-accent, #FE6631);
    border: none;
    border-radius: 32px;
    cursor: pointer;
    transition: background .15s ease, filter .15s ease;
}

.avi-lease-unavailable { font-family: 'Livvic', sans-serif; color: #666; }

/* --- Popup ------------------------------------------------------------- */

.avi-lease-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 20, 20, .55);
}

/* The hidden attribute must win over display:flex — without this the
   popup would be visible on page load */
.avi-lease-popup-overlay[hidden] { display: none; }

.avi-lease-popup {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    font-family: 'Livvic', sans-serif;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

/* Close button: icon only — no background, no hover effect */
.avi-lease-popup-close,
.avi-lease-popup-close:hover,
.avi-lease-popup-close:focus,
.avi-lease-popup-close:active {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    box-shadow: none;
    font-size: 17px;
    line-height: 1;
    color: #1d2327;
    cursor: pointer;
    outline: none;
}

.avi-lease-popup-title { margin: 0 0 14px; font-size: 34px; font-weight: 600; }

.avi-lease-summary {
    background: #faf7f5;
    border: 1px solid #f0e4de;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 15px;
}
.avi-lease-summary-row { display: flex; justify-content: space-between; padding: 3px 0; }
.avi-lease-summary-row strong { font-weight: 600; }
.avi-lease-summary-row--price { color: var(--avi-accent, #FE6631); font-weight: 600; }

.avi-lease-popup-cols { display: flex; gap: 10px; }
.avi-lease-popup-cols .avi-lease-input { flex: 1; }

/* High-specificity selectors so theme/Elementor input styles (borders,
   radius, height) never override the popup fields — all fields match the
   textarea look */
.avi-lease-popup input.avi-lease-input,
.avi-lease-popup textarea.avi-lease-input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 16px;
    margin: 0 0 10px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    color: #1d2327;
    background: #f2f2f3;
    border: 1px solid transparent;
    border-radius: 10px;
    box-shadow: none;
    outline: none;
    min-height: 0;
    height: auto;
}
.avi-lease-popup input.avi-lease-input:focus,
.avi-lease-popup textarea.avi-lease-input:focus {
    border-color: var(--avi-accent, #FE6631);
    background: #f2f2f3;
    box-shadow: none;
    outline: none;
}
.avi-lease-textarea { resize: vertical; }

.avi-lease-hp { position: absolute !important; left: -9999px !important; height: 0; width: 0; opacity: 0; }

.avi-lease-error { color: #d63638; font-size: 14px; margin: 4px 0 10px; }

.avi-lease-send {
    display: block;
    width: 100%;
    padding: 16px 26px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    color: #fff;
    background: var(--avi-accent, #FE6631);
    border: none;
    border-radius: 32px;
    cursor: pointer;
    transition: background .15s ease, filter .15s ease;
}
.avi-lease-send[disabled] { opacity: .6; cursor: default; }

/* Hover/focus/active: slightly darker accent colour on both buttons.
   color-mix() darkens the accent CSS variable; older browsers fall back
   to a brightness filter. */
.avi-lease-submit:hover,
.avi-lease-submit:focus,
.avi-lease-send:hover,
.avi-lease-send:focus { filter: brightness(.88); outline: none; }

.avi-lease-submit:active,
.avi-lease-send:active { filter: brightness(.78); outline: none; }

@supports (background: color-mix(in srgb, #fff, #000)) {
    .avi-lease-submit:hover,
    .avi-lease-submit:focus,
    .avi-lease-send:hover,
    .avi-lease-send:focus {
        background: color-mix(in srgb, var(--avi-accent, #FE6631) 86%, #000);
        filter: none;
    }
    .avi-lease-submit:active,
    .avi-lease-send:active {
        background: color-mix(in srgb, var(--avi-accent, #FE6631) 74%, #000);
        filter: none;
    }
}

.avi-lease-thanks { text-align: center; padding: 18px 6px; }
.avi-lease-thanks h3 { font-size: 22px; margin: 0 0 8px; }
