﻿
.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    text-decoration: none;
    font-size: var(--font-size-medium); /*regular btn*/
    line-height: var(--line-height-default); /*regular btn*/
    font-weight: var(--font-weight-semibold);
    color: var(--text-color-main);
    background-color: transparent;
    text-align: center;
    border: 1px solid transparent;
    border-radius: var(--border-radius-default);
    padding: 8px 16px; /*regular btn*/
    height: 36px; /*regular btn*/
    gap: 6px;
    box-shadow: var(--shadow-button);
    transition: background-color 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease, text-decoration-color 0.5s ease;
}

.btn-lg, .btn-group-lg > .btn {
    padding: 16px 24px;
    font-size: var(--font-size-medium);
    line-height: var(--line-height-default);
    height: 44px;
}

.btn-sm, .btn-group-sm > .btn {
    padding: 8px;
    font-size: var(--font-size-small);
    line-height: var(--line-height-small);
    height: 32px;
}

@media (max-width: 768px) {
    .btn {
        --border-radius-default: 6px;
        gap: 4px;
        padding: 5px 10px; /*regular btn*/
        height: auto; /*regular btn*/
        border-radius: var(--border-radius-default);
    }

    .btn-lg, .btn-group-lg > .btn {
        padding: 10px 15px;
        height: auto;
    }

    .btn-sm, .btn-group-sm > .btn {
        padding: 5px;
        height: auto;
    }
}
@media (max-width: 575px) {
    .btn {
        --border-radius-default: 6px;
        gap: 4px;
        padding: 5px 4px; /*regular btn*/
        height: auto; /*regular btn*/
        border-radius: var(--border-radius-default);
    }

    .btn-lg, .btn-group-lg > .btn {
        padding: 10px 7px;
        height: auto;
    }

    .btn-sm, .btn-group-sm > .btn {
        padding: 3px;
        height: auto;
    }
}

.btn:disabled, .btn.disabled {
    pointer-events: none;
    opacity: 0.40;
}

.btn.loading:disabled, .btn.loading.disabled {
    opacity: 1;
}

.btn:focus-visible {
    outline: 1px solid var(--black);
    outline-offset: 2px;
}

.btn-primary {
    color: var(--white);
    background-color: var(--primary-color);
    border: 0.5px solid var(--primary-color);
}

.btn-primary:hover, .btn-primary.active {
    background-color: var(--primary-color-hover);
    border: 0.5px solid var(--primary-color-hover);
    box-shadow: var(--shadow-button-hover);
}

.btn-primary:active:focus {
    background-color: var(--primary-color);
    border: 0.5px solid var(--primary-color);
    box-shadow: var(--shadow-button-pressed);
}

.btn-secondary {
    color: var(--primary-color);
    /*background-color: var(--white);*/
    background-color: transparent;
    /*border: 0.5px solid var(--btn-secondary-border);*/
    border: 0.5px solid currentcolor;
}

    .btn-secondary:hover {
        box-shadow: var(--shadow-button-hover);
    }

    .btn-secondary:active:focus {
        box-shadow: var(--shadow-button-pressed);
    }

.btn-tertiary {
    color: var(--white);
    background-color: var(--secondary-color);
    border: 0.5px solid var(--secondary-color);
}

    .btn-tertiary:hover {
        background-color: var(--secondary-color-hover);
        border: 0.5px solid var(--secondary-color-hover);
        box-shadow: var(--shadow-button-hover);
    }

    .btn-tertiary:active:focus {
        background-color: var(--secondary-color);
        border: 0.5px solid var(--secondary-color);
        box-shadow: var(--shadow-button-pressed);
    }

.btn-destructive {
    color: var(--white);
    background-color: var(--danger-color);
    border: 0.5px solid var(--danger-color);
}

    .btn-destructive:hover {
        background-color: var(--danger-color-hover);
        border: 0.5px solid var(--danger-color-hover);
        box-shadow: var(--shadow-button-hover);
    }

    .btn-destructive:active:focus {
        background-color: var(--danger-color);
        border: 0.5px solid var(--danger-color);
        box-shadow: var(--shadow-button-pressed);
    }

.btn-plain {
    color: var(--text-color-main);
    background-color: transparent;
    border: 0.5px solid transparent;
    box-shadow: none;
/*    text-decoration-line: underline;*/ /*for the btn-plain's span using box-shadow for underline*/
    text-decoration-line: underline; /*for the btn-plain's span using box-shadow for underline*/
    text-decoration-color: transparent;
}

.btn-plain:not(:has(i)):hover {
    text-decoration-color: currentColor;
}

.btn-plain > div,
.btn-plain > span {
    transition: box-shadow 0.5s ease;
    line-height: 0.79;
}


/* Apply hover style only if the div or span has an <i> sibling */
.btn-plain:hover:has(i) > div,
.btn-plain:hover:has(i) > span {
    box-shadow: inset 0 -1px 0 0 currentColor;
}

/*    .btn-plain:hover > div,
    .btn-plain:hover > span {
        box-shadow: inset 0 -1px 0 0 currentColor;
    }*/



.btn-box {
    width: 32px;
    height: 32px;
}

/*Toggle Buttons*/
.btn-check {
    position: fixed; /*position absolute causes extra height or scrollbar issues in angular webpage */
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

.btn-weightage {
    display: inline-flex;
    width: 24px;
    height: 24px;
    justify-content: center;
    align-items: center;
    background-color: var(--white);
    color: var(--text-color-subdued);
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    font-weight: var(--font-weight-medium);
    border-radius: var(--border-radius-small);
    cursor: pointer;
}

    .btn-check:checked + .btn-weightage, .btn-weightage:has(.btn-check:checked) {
        background-color: var(--menu-selected-color);
        border: 0.5px solid var(--theme-color);
    }

.btn-rating {
    display: inline-flex;
    width: 32px;
    height: 32px;
    justify-content: center;
    align-items: center;
    background-color: var(--color-grey-light);
    color: var(--text-color-main);
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    font-weight: var(--font-weight-medium);
    border-radius: var(--border-radius-small);
    cursor: pointer;
}

.btn-check:checked + .btn-rating, .btn-rating:has(.btn-check:checked) {
    background-color: var(--menu-selected-color);
    border: 0.5px solid var(--theme-color);
}

/*group buttons*/
/*@media(max-width:575px) {
    .btn-lg.btn-group-lg > .btn {
        padding: 10px 6px;
        height: auto;
    }

    .btn-group > .btn{
        position: relative;
        flex: 1 1 auto;
        padding: 5px 4px;
    }

    .btn-sm > .btn {
        padding: 3px;
        height: auto;
    }
}*/

/*.btn-group {
    padding: var(--spacing-2);
    border-radius:var(--border-radius-default);
}*/

/*.buttons-group {
    border-radius: var(--border-radius-default);
    display: flex;
    align-items: center;
}*/
   /* .buttons-group .btn:not(:first-child):not(:last-child) {
        border-right: 0.5px solid var(--color-grey-medium);
        border-left: 0.5px solid var(--color-grey-medium); 
        border-radius: 0;
    }*/

/*.button-group .btn {
    border-radius: 0;*/ /* Reset border-radius for consistency */
    /*border: none;*/ /* Optional: reset all borders if needed */
/*}*/

    /* First button */
/*.button-group .btn:first-child {*/
    /*border-right: 1px solid #ccc;*/
    /*border-radius:8px 0 0 8px;
}*/

    /* Center button */
/*.button-group .btn:not(:first-child):not(:last-child) {*/
    /*border-left: 1px solid #ccc;*/
    /*border-right: 1px solid #ccc;*/
    /*border-radius: 0;
}*/

    /* Last button */
/*.button-group .btn:last-child {*/
    /*border-left: 1px solid #ccc;*/
    /*border-radius:0 8px 8px 0;
}*/

/*.btn-group, .btn-group-vertical {
    position: relative;
    display: -ms-inline-flexbox;
    display: inline-flex;
    vertical-align: middle;
}

.btn-group > .btn-group:not(:last-child) > .btn, .btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn:not(:disabled):not(.disabled) {
    cursor: pointer;
}

.btn-group-vertical > .btn, .btn-group > .btn
 {
    position: relative;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
}
.btn-default
 {
    background-color: #f8f9fa;
    border-color: #ddd;
    color: #444;
}*/