/* Krystal7 Custom Lead Form Styles */
.k7-lead-form {
    font-family: 'Poppins', sans-serif;
    max-width: 100%;
}
.k7-lead-form__header { text-align: center; margin-bottom: 22px; }
.k7-lead-form__title { font-size: 1.5rem; font-weight: 800; color: #03152d; margin-bottom: 6px; }
.k7-accent { color: #ff7f27; }
.k7-lead-form__subtitle { color: #666; font-size: 13.5px; margin: 0; }
.k7-lead-form__field { margin-bottom: 16px; position: relative; }
.k7-lead-form__field label {
    display: block; font-size: 12.5px; font-weight: 600;
    color: #03152d; margin-bottom: 6px; letter-spacing: 0.2px;
}
.k7-required { color: #dc3545; }
.k7-input, .k7-textarea {
    width: 100%; padding: 11px 14px; border: 1.5px solid #e5e7eb;
    border-radius: 10px; font-size: 14px; font-family: 'Poppins', sans-serif;
    color: #03152d; background: white; transition: border-color 0.2s; box-sizing: border-box;
}
.k7-input:focus, .k7-textarea:focus { outline: none; border-color: #ff7f27; }
.k7-textarea { resize: vertical; min-height: 80px; }

/* Phone input with intl-tel-input */
.iti { width: 100%; }
.iti__selected-flag { border-radius: 10px 0 0 10px; background: #f8f9fa; }
.iti__country-list {
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    z-index: 100000;
}

/* Tag picker */
.k7-tag-picker { position: relative; }
.k7-tag-picker__display {
    min-height: 44px; padding: 8px 40px 8px 12px;
    border: 1.5px solid #e5e7eb; border-radius: 10px;
    background: white; cursor: pointer; display: flex;
    flex-wrap: wrap; gap: 6px; align-items: center;
    transition: border-color 0.2s; position: relative;
}
.k7-tag-picker__display::after {
    content: ''; position: absolute; right: 16px; top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    transition: transform 0.2s;
}
.k7-tag-picker.k7-open .k7-tag-picker__display { border-color: #ff7f27; }
.k7-tag-picker.k7-open .k7-tag-picker__display::after {
    transform: translateY(-50%) rotate(180deg);
}
.k7-tag-picker__placeholder { color: #999; font-size: 14px; }
.k7-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 127, 39, 0.12); color: #03152d;
    padding: 4px 10px 4px 12px; border-radius: 50px;
    font-size: 12px; font-weight: 600;
}
.k7-tag__remove {
    cursor: pointer; color: #ff7f27; font-size: 16px;
    line-height: 1; transition: color 0.2s; font-weight: bold;
}
.k7-tag__remove:hover { color: #dc3545; }
.k7-tag-picker__dropdown {
    display: none; position: absolute; top: calc(100% + 4px);
    left: 0; right: 0; background: white; border: 1px solid #e5e7eb;
    border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    max-height: 260px; overflow-y: auto; z-index: 10000;
}
.k7-tag-picker.k7-open .k7-tag-picker__dropdown { display: block; }
.k7-tag-picker__option {
    padding: 10px 14px; cursor: pointer; font-size: 13px;
    color: #03152d; transition: background 0.15s;
}
.k7-tag-picker__option:hover { background: #f8f9fa; }
.k7-tag-picker__option.k7-selected {
    background: rgba(21, 81, 49, 0.06); color: #155131; font-weight: 600;
}
.k7-tag-picker__option.k7-selected::before {
    content: '\2713';
    display: inline-block;
    margin-right: 8px;
    color: #155131;
    font-weight: bold;
}

/* Submit */
.k7-submit-btn {
    width: 100%; background: #ff7f27; color: white; border: none;
    padding: 13px; border-radius: 50px; font-weight: 700; font-size: 15px;
    cursor: pointer; transition: all 0.2s; margin-top: 6px;
    font-family: 'Poppins', sans-serif; position: relative;
}
.k7-submit-btn:hover:not(:disabled) {
    background: #ff8c32; transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(255, 127, 39, 0.35);
}
.k7-submit-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.k7-submit-btn__spinner { display: none; }
.k7-submit-btn.k7-loading .k7-submit-btn__text { display: none; }
.k7-submit-btn.k7-loading .k7-submit-btn__spinner { display: inline-block; }

.k7-lead-form__privacy {
    font-size: 11px; color: #888; text-align: center;
    margin-top: 10px; line-height: 1.4;
}
.k7-lead-form__error {
    color: #dc3545; font-size: 12.5px; padding: 10px 14px;
    background: #fef2f2; border-radius: 8px; margin-bottom: 10px; display: none;
}
.k7-lead-form__error.k7-active { display: block; }

.k7-lead-form__success {
    display: none; text-align: center; padding: 24px 16px;
}
.k7-lead-form__success.k7-active { display: block; }
.k7-success-icon {
    width: 54px; height: 54px; background: #155131; color: white;
    border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; font-size: 22px; margin-bottom: 14px;
}
.k7-lead-form__success h4 {
    color: #03152d; font-weight: 800; margin-bottom: 8px; font-size: 1.15rem;
}
.k7-lead-form__success p {
    color: #555; font-size: 13.5px; margin: 0;
}

/* Test page styling */
.k7-test-wrapper {
    max-width: 500px; margin: 60px auto; padding: 40px 30px;
    background: white; border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.08);
}
.k7-test-wrapper h1 {
    text-align: center; color: #03152d; margin-bottom: 30px; font-size: 1.3rem;
}

/* Privacy shield accent */
.k7-lead-form__privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.k7-lead-form__privacy::before {
    content: '';
    display: inline-block;
    width: 13px;
    height: 13px;
    background-color: #155131;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><path d='M12 2L4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm-1 14l-4-4 1.41-1.41L11 13.17l5.59-5.59L18 9l-7 7z'/></svg>") no-repeat center / contain;
    mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'><path d='M12 2L4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm-1 14l-4-4 1.41-1.41L11 13.17l5.59-5.59L18 9l-7 7z'/></svg>") no-repeat center / contain;
    flex-shrink: 0;
}

/* K7-SHRINK-START */
/* Compact form sizing - applies everywhere _lead_form.html appears */
.k7-input, .k7-textarea {
    padding: 10px 14px !important;
    font-size: 14.5px !important;
    line-height: 1.4 !important;
}
.k7-textarea { min-height: 70px !important; }
.k7-lead-form__field { margin-bottom: 14px !important; }
.k7-lead-form__field label {
    font-size: 13.5px !important;
    margin-bottom: 5px !important;
    font-weight: 600 !important;
    display: block !important;
}
.k7-lead-form__submit, .k7-lead-form button[type="submit"] {
    padding: 12px 24px !important;
    font-size: 15px !important;
}
/* Phone field with intl-tel-input flag selector */
.iti { display: block !important; width: 100% !important; }
.iti--allow-dropdown input[type="tel"].k7-input,
.iti--separate-dial-code input[type="tel"].k7-input,
input[type="tel"].k7-phone-input.k7-input {
    padding-left: 88px !important;
}
.iti__flag-container { z-index: 5 !important; }
.iti__selected-flag { padding: 0 8px 0 12px !important; }
/* K7-SHRINK-END */

/* K7-MODAL-SHRINK: make shrink rules work inside Bootstrap modals too */
.modal-body .k7-input, .modal-body .k7-textarea {
    padding: 10px 14px !important;
    font-size: 14.5px !important;
    line-height: 1.4 !important;
}
.modal-body .k7-textarea { min-height: 70px !important; }
.modal-body .k7-lead-form__field { margin-bottom: 14px !important; }
.modal-body .k7-lead-form__field label {
    font-size: 13.5px !important;
    margin-bottom: 5px !important;
    font-weight: 600 !important;
}
.modal-body .k7-lead-form__submit,
.modal-body .k7-lead-form button[type="submit"] {
    padding: 12px 24px !important;
    font-size: 15px !important;
}
.modal-body .iti--allow-dropdown input[type="tel"].k7-input,
.modal-body .iti--separate-dial-code input[type="tel"].k7-input,
.modal-body input[type="tel"].k7-phone-input.k7-input {
    padding-left: 88px !important;
}
