/* Lead-Gen front-end styling */

.leadgen-host {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 300px;
    height: 533.31px;
    display: none;
    z-index: 4;
    pointer-events: none;
    box-sizing: border-box;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform-origin: top;
    transform: scaleY(1.1);
    overflow: hidden;
}

.leadgen-host.position-top {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
}

.leadgen-host.position-middle {
    display: flex;
    justify-content: center;
    align-items: center;
}

.leadgen-host.position-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

.leadgen-host.position-full-height {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
}

.leadgen-wrapper {
    pointer-events: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-radius: 18px;
    background-color: transparent;
    padding: 16px;
    box-sizing: border-box;
    --leadgen-label-color: #000000;
    --leadgen-label-font-weight: 600;
    --leadgen-placeholder-color: #999999;
    --leadgen-border-color: #cccccc;
    --leadgen-input-font-weight: 400;
    --leadgen-input-border-width: 1px;
    --leadgen-input-border-radius: 10px;
}

.leadgen-wrapper.full-height {
    height: 100%;
    justify-content: space-between;
}

.leadgen-wrapper.opaque-background,
.leadgen-wrapper.solid-background {
    backdrop-filter: none;
}

.leadgen-host.position-top .leadgen-wrapper.opaque-background,
.leadgen-host.position-top .leadgen-wrapper.solid-background {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.leadgen-host.position-bottom .leadgen-wrapper.opaque-background,
.leadgen-host.position-bottom .leadgen-wrapper.solid-background {
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.leadgen-host.position-middle .leadgen-wrapper.opaque-background,
.leadgen-host.position-middle .leadgen-wrapper.solid-background {
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
}

.leadgen-host.position-full-height .leadgen-wrapper.opaque-background,
.leadgen-host.position-full-height .leadgen-wrapper.solid-background {
    border-radius: 0;
}

.leadgen-wrapper.size-small {
    --leadgen-input-font-size: 12px;
    --leadgen-input-padding: 6px 8px;
    --leadgen-label-font-size: 12px;
}

.leadgen-wrapper.size-medium {
    --leadgen-input-font-size: 14px;
    --leadgen-input-padding: 8px 10px;
    --leadgen-label-font-size: 13px;
}

.leadgen-wrapper.size-large {
    --leadgen-input-font-size: 16px;
    --leadgen-input-padding: 12px 14px;
    --leadgen-label-font-size: 15px;
}

.leadgen-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin: 0px;
}

.leadgen-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leadgen-field--consent {
    flex-direction: row;
}

.leadgen-consent {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--leadgen-consent-font-size, var(--leadgen-label-font-size, 13px));
    font-weight: var(--leadgen-consent-font-weight, 600);
    color: var(--leadgen-consent-prefix-color, var(--leadgen-label-color));
    font-family: 'Montserrat', sans-serif;
    line-height: 1.35;
}

.leadgen-consent input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.leadgen-consent-link {
    color: var(--leadgen-consent-link-color, #0a6ff0);
    text-decoration: underline;
}

.leadgen-consent-text {
    color: var(--leadgen-consent-prefix-color, var(--leadgen-label-color));
}

.leadgen-field label:not(.leadgen-consent) {
    color: var(--leadgen-label-color);
    font-size: var(--leadgen-label-font-size, 13px);
    font-weight: var(--leadgen-label-font-weight, 600);
    line-height: 1.3;
    font-family: 'Montserrat', sans-serif;
}

.leadgen-field input,
.leadgen-field textarea,
.leadgen-field select {
    font-size: var(--leadgen-input-font-size, 14px);
    font-weight: var(--leadgen-input-font-weight, 400);
    padding: var(--leadgen-input-padding, 8px 10px);
    border-radius: var(--leadgen-input-border-radius, 10px);
    border: var(--leadgen-input-border-width, 1px) solid var(--leadgen-border-color);
    background: rgba(255, 255, 255, 0.92);
    color: #111111;
    width: 100%;
    display: block;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
    line-height: 1.35;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.leadgen-control {
    position: relative;
    width: 100%;
    display: block;
}

.leadgen-field select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 40px;
    background-color: rgba(255, 255, 255, 0.92);
    font-family: 'Montserrat', sans-serif;
}

.leadgen-field select.leadgen-select--placeholder {
    color: var(--leadgen-placeholder-color);
}

.leadgen-control--select::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 16px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.45);
    pointer-events: none;
    transform: translateY(-50%);
}

.leadgen-control--date input[type="date"] {
    padding-right: 42px;
}

.leadgen-control--custom .leadgen-date-input {
    cursor: pointer;
}

.leadgen-date-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 10px;
    z-index: 15;
    backdrop-filter: blur(2px);
}

.leadgen-date-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
}

.leadgen-date-nav {
    background: none;
    border: none;
    color: #1f1f1f;
    font-size: 18px;
    cursor: pointer;
    padding: 2px 6px;
}

.leadgen-date-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    font-family: 'Montserrat', sans-serif;
}

.leadgen-date-weekday {
    font-size: 11px;
    text-align: center;
    color: rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

.leadgen-date-cell {
    border: none;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 8px;
    font-size: 12px;
    padding: 6px 0;
    text-align: center;
    cursor: pointer;
    color: #1f1f1f;
}

.leadgen-date-cell--selected {
    background: #007cba;
    color: #ffffff;
    font-weight: 600;
}

.leadgen-date-cell--empty {
    visibility: hidden;
}

.leadgen-field textarea {
    min-height: 80px;
    resize: vertical;
}

.leadgen-field input:focus,
.leadgen-field textarea:focus,
.leadgen-field select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.25);
}

.leadgen-field input::placeholder,
.leadgen-field textarea::placeholder {
    color: var(--leadgen-placeholder-color);
    opacity: 1;
}

.leadgen-submit {
    margin-top: 0px;
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    border: none;
    background: linear-gradient(135deg, #ffba45 0%, #ff8a00 100%);
    color: #1f1f1f;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    min-height: 46px;
}

.leadgen-submit-wrapper {
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 0;
}

.leadgen-submit-wrapper--left {
    justify-content: flex-start;
}

.leadgen-submit-wrapper--right {
    justify-content: flex-end;
}

.leadgen-submit-wrapper--center {
    justify-content: center;
}

.leadgen-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.leadgen-submit:active {
    transform: scale(0.98);
}

.leadgen-submit--loading {
    cursor: progress;
    pointer-events: none;
    color: transparent;
    gap: 0;
}

.leadgen-submit--loading::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-top-color: rgba(255, 255, 255, 0.25);
    animation: leadgen-spin 0.75s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.leadgen-submit.leadgen-submit--auto {
    width: auto;
    align-self: auto;
    min-width: 160px;
}

.leadgen-submit--success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #03210f !important;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.7);
    animation: leadgen-success-pulse 1s ease-out;
}

.leadgen-submit--success-done {
    animation: none;
}

.leadgen-submit--error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #fff5f5 !important;
    box-shadow: 0 0 18px rgba(239, 68, 68, 0.35);
}

.leadgen-submit[disabled] {
    cursor: not-allowed;
}

@keyframes leadgen-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes leadgen-success-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    60% {
        box-shadow: 0 0 15px 10px rgba(34, 197, 94, 0.2);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.leadgen-helper-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.leadgen-field--error input,
.leadgen-field--error textarea,
.leadgen-field--error select {
    border-color: #f87171;
    box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.35);
    background: rgba(255, 255, 255, 0.96);
}

.leadgen-field--error input:focus,
.leadgen-field--error textarea:focus,
.leadgen-field--error select:focus {
    background: rgba(255, 255, 255, 0.96);
}

.leadgen-field-error {
    font-size: 12px;
    color: #b91c1c;
    line-height: 1.4;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    background: rgb(255, 255, 255);
    border: 1px solid rgba(248, 113, 113, 0.6);
    border-radius: 10px;
    padding: 8px 12px;
    margin-top: 6px;
    box-sizing: border-box;
    width: 100%;
}

.leadgen-status {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    background: rgba(17, 24, 39, 0.7);
    color: #ffffff;
    display: none;
}

.leadgen-status--visible {
    display: block;
}

.leadgen-status--success {
    background: rgba(34, 197, 94, 0.85);
    color: #04130a;
}

.leadgen-status--error {
    background: rgba(239, 68, 68, 0.9);
}

.leadgen-status--info {
    background: rgba(59, 130, 246, 0.85);
}

.leadgen-submit--loading {
    opacity: 0.85;
}
