/**
 * Copyright © Asv_CrmLead All rights reserved.
 * See COPYING.txt for license details.
 */

/* Ensure CRM Lead button is clickable */
.lead-section .crm-lead,
.lead-section button.crm-lead,
#generate-crm-lead-btn.crm-lead {
    cursor: pointer !important;
    pointer-events: auto !important;
}

.lead-section button:disabled {
    cursor: not-allowed !important;
    pointer-events: none !important;
}

#crm-lead-modal {
    position: fixed;
    left: 0;
    width: 100%;
}

.crm-lead-modal-close {
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}


.crm-lead-field {
    margin-bottom: 20px;
}

.crm-lead-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600 !important;
    color: #1E194A;
    font-size: 14px !important;
}

.crm-lead-field .help-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    font-size: 12px;
    cursor: help;
    margin-left: 5px;
}

.crm-lead-field input[type="text"],
.crm-lead-field input[type="number"],
.crm-lead-field select,
.crm-lead-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #bababa !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 600;
}
.crm-lead-field select {
    height: 35px;
}

.crm-lead-field textarea {
    resize: vertical;
}

.crm-lead-field small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.crm-lead-checkboxes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.crm-lead-checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    font-size: 14px !important;
}

.crm-lead-checkbox-group input[type="checkbox"] {
    margin-right: 5px;
    height: 25px;
    width: 25px;
    -webkit-appearance: none;
    border: 2px solid #A5A5A5;
    border-radius: 4px;
    outline: 0;
    background: none;
    cursor: pointer;
    line-height: 0;
    margin-top: 0;
    position: relative;
}

.crm-lead-checkbox-group input[type="checkbox"]::before {
    content: '';
    background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNiIgaGVpZ2h0PSIyNiIgdmlld0JveD0iMCAwIDI2IDI2IiBmaWxsPSJub25lIiBhcmlhLWhpZGRlbj0idHJ1ZSI+CiAgPHBhdGggZD0iTTE4LjMzMzggOSBMMTEuMjIyNyAxNyBMNy42NjY2NyAxMyIgc3Ryb2tlPSIjMUUxOTRBIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgZmlsbD0ibm9uZSI+PC9wYXRoPgo8L3N2Zz4K);
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    background-position: center;
    background-size: 23px;
    background-repeat: no-repeat;
    position: absolute;
    opacity: 0;
    visibility: hidden;
}

.crm-lead-checkbox-group input[type="checkbox"]:checked {
    border-color: #1E194A;
}
.crm-lead-checkbox-group input[type="checkbox"]:checked:before {
    opacity: 1;
    visibility: visible;
}

.revenue-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.revenue-input-wrapper .currency-symbol {
    position: absolute;
    left: 12px;
    font-weight: 600;
    color: #333;
    z-index: 1;
    pointer-events: none;
}

.revenue-input-wrapper #expected_revenue {
    padding-left: 30px;
    font-weight: 600;
    font-size: 14px;
    width: 100%;
}

.crm-lead-modal-footer {
    padding: 20px 0 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.crm-lead-modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.crm-lead-modal-footer .action.secondary {
    background: transparent;
    color: #1e194a !important;
    font-weight: 600;
    font-size: 14px !important;
}


.crm-lead-modal-footer .action.primary {
    background: #DE0021;
    color: #fff;
}

.crm-lead-modal-footer .action.primary:hover {
    background: #b8001a;
}

body.crm-lead-modal-open {
    overflow: hidden;
}

/* Fix date picker z-index to appear above modal */
#crm-lead-modal {
    z-index: 10000;
}

#crm-lead-modal .modal-dialog {
    z-index: 10001;
}

#crm-lead-modal .crm-lead-modal-content {
    z-index: 10002;
}

/* Date picker must be above modal - use very high z-index */
.ui-datepicker,
.ui-datepicker-wrapper,
.ui-datepicker-header,
.ui-datepicker-calendar,
.ui-datepicker.ui-widget.ui-widget-content,
.ui-datepicker-div {
    z-index: 1000000000 !important;
}

@media (max-width: 768px) {
    .crm-lead-modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
    }

    .crm-lead-checkboxes {
        grid-template-columns: repeat(2, 1fr);
    }
}

