/* ==========================================================
   Bizgix Forms
   File: assets/css/forms.css
========================================================== */


/* ----------------------------------------------------------
   Form Group
---------------------------------------------------------- */

.bgx-form-group{
    margin-bottom:20px;
}


/* ----------------------------------------------------------
   Labels
---------------------------------------------------------- */

.bgx-form-label{
    display:block;

    margin-bottom:8px;

    font-size:13px;
    font-weight:600;

    color:var(--bgx-heading);
}

.bgx-form-label .required{
    color:var(--bgx-danger);
    margin-left:3px;
}


/* ----------------------------------------------------------
   Inputs
---------------------------------------------------------- */

.bgx-input,
.bgx-select,
.bgx-textarea{

    width:100%;

    min-height:46px;

    padding:10px 14px;

    border:1px solid var(--bgx-border);

    border-radius:var(--bgx-radius);

    background:var(--bgx-surface);

    color:var(--bgx-heading);

    font-family:var(--bgx-font-family);

    font-size:14px;
    font-weight:400;

    outline:none;

    transition:var(--bgx-transition);

}


/* ----------------------------------------------------------
   Placeholder
---------------------------------------------------------- */

.bgx-input::placeholder,
.bgx-textarea::placeholder{
    color:#94a3b8;
}


/* ----------------------------------------------------------
   Hover
---------------------------------------------------------- */

.bgx-input:hover,
.bgx-select:hover,
.bgx-textarea:hover{

    border-color:var(--bgx-border-dark);

}


/* ----------------------------------------------------------
   Focus
---------------------------------------------------------- */

.bgx-input:focus,
.bgx-select:focus,
.bgx-textarea:focus{

    border-color:var(--bgx-primary);

    box-shadow:
        0 0 0 3px rgba(37,99,235,.10);

}


/* ----------------------------------------------------------
   Textarea
---------------------------------------------------------- */

.bgx-textarea{

    min-height:120px;

    resize:vertical;

    line-height:1.6;

}


/* ----------------------------------------------------------
   Select
---------------------------------------------------------- */

.bgx-select{

    appearance:none;

    background-image:
        linear-gradient(45deg,transparent 50%,#64748b 50%),
        linear-gradient(135deg,#64748b 50%,transparent 50%);

    background-position:
        calc(100% - 18px) 19px,
        calc(100% - 13px) 19px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat:no-repeat;

    padding-right:40px;

}


/* ----------------------------------------------------------
   Input With Icon
---------------------------------------------------------- */

.bgx-input-group{
    position:relative;
}

.bgx-input-group .bgx-input{
    padding-left:44px;
}

.bgx-input-icon{

    position:absolute;

    left:15px;
    top:50%;

    transform:translateY(-50%);

    display:flex;
    align-items:center;
    justify-content:center;

    color:var(--bgx-muted);

    font-size:18px;

    pointer-events:none;

}


/* ----------------------------------------------------------
   Input Action
---------------------------------------------------------- */

.bgx-input-action{

    position:absolute;

    right:10px;
    top:50%;

    transform:translateY(-50%);

    width:34px;
    height:34px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:none;

    border-radius:8px;

    background:transparent;

    color:var(--bgx-light-text);

    cursor:pointer;

    transition:var(--bgx-transition);

}

.bgx-input-action:hover{

    background:var(--bgx-primary-soft);

    color:var(--bgx-primary);

}


/* ----------------------------------------------------------
   Helper Text
---------------------------------------------------------- */

.bgx-form-help{

    display:block;

    margin-top:7px;

    font-size:12px;

    color:var(--bgx-muted);

}


/* ----------------------------------------------------------
   Error
---------------------------------------------------------- */

.bgx-form-error{

    display:block;

    margin-top:7px;

    font-size:12px;

    color:var(--bgx-danger);

}

.bgx-input.is-error,
.bgx-select.is-error,
.bgx-textarea.is-error{

    border-color:var(--bgx-danger);

    box-shadow:
        0 0 0 3px rgba(220,38,38,.08);

}


/* ----------------------------------------------------------
   Success
---------------------------------------------------------- */

.bgx-input.is-success,
.bgx-select.is-success,
.bgx-textarea.is-success{

    border-color:var(--bgx-success);

}


/* ----------------------------------------------------------
   Disabled
---------------------------------------------------------- */

.bgx-input:disabled,
.bgx-select:disabled,
.bgx-textarea:disabled{

    background:#f8fafc;

    color:#94a3b8;

    cursor:not-allowed;

}


/* ----------------------------------------------------------
   Checkbox
---------------------------------------------------------- */

.bgx-check{

    display:flex;

    align-items:center;

    gap:10px;

    cursor:pointer;

    font-size:14px;

    color:var(--bgx-text);

}

.bgx-check input{

    width:17px;
    height:17px;

    accent-color:var(--bgx-primary);

    cursor:pointer;

}


/* ----------------------------------------------------------
   Switch
---------------------------------------------------------- */

.bgx-switch{

    position:relative;

    display:inline-flex;

    width:44px;
    height:24px;

}

.bgx-switch input{
    display:none;
}

.bgx-switch-slider{

    position:absolute;

    inset:0;

    background:#cbd5e1;

    border-radius:24px;

    cursor:pointer;

    transition:var(--bgx-transition);

}

.bgx-switch-slider::before{

    content:"";

    position:absolute;

    width:18px;
    height:18px;

    left:3px;
    top:3px;

    background:#ffffff;

    border-radius:50%;

    box-shadow:0 1px 3px rgba(15,23,42,.20);

    transition:var(--bgx-transition);

}

.bgx-switch input:checked + .bgx-switch-slider{

    background:var(--bgx-primary);

}

.bgx-switch input:checked + .bgx-switch-slider::before{

    transform:translateX(20px);

}


/* ----------------------------------------------------------
   Form Row
---------------------------------------------------------- */

.bgx-form-row{

    display:grid;

    grid-template-columns:repeat(2,minmax(0,1fr));

    gap:20px;

}


/* ----------------------------------------------------------
   Form Section
---------------------------------------------------------- */

.bgx-form-section{

    padding:24px;

    background:var(--bgx-card);

    border:1px solid var(--bgx-border-soft);

    border-radius:var(--bgx-radius-lg);

}

.bgx-form-section-title{

    margin:0 0 6px;

    font-size:16px;
    font-weight:700;

    color:var(--bgx-heading);

}

.bgx-form-section-description{

    margin:0 0 24px;

    font-size:13px;

    color:var(--bgx-muted);

}


/* ----------------------------------------------------------
   Mobile
---------------------------------------------------------- */

@media(max-width:768px){

    .bgx-form-row{
        grid-template-columns:1fr;
    }

    .bgx-input,
    .bgx-select{
        min-height:44px;
    }

}