/* place after bootstrap.css */
.table-fixed {
    table-layout: fixed;
    width: 100%;
}

.table-fixed thead th {
    white-space: nowrap; /*text stays on one line*/
    overflow: hidden; /*extra text is hidden if too long*/
    text-overflow: ellipsis; /*adds … if text is too long*/
}

/* make first column narrow and center the checkbox */
.table-fixed thead th:first-child,
.table-fixed tbody th:first-child {
    width: 40px; /* adjust px as needed */
    text-align: center; /*centers the checkbox left–right*/
    vertical-align: middle; /*centers the checkbox top–bottom*/
}

/* ensure checkbox itself doesn't cause padding growth */
.table-fixed .custom-control {
    padding-left: 0 !important;
    margin: 0 auto; /*centers the checkbox inside the cell*/
    display: inline-block; /*stops it from taking the full width*/
}

.pe-none {
    pointer-events: none !important;
}

.ms-3 {
    margin-inline-start: 1rem !important; /* mirrors ml-3's 1rem value */
}

.me-3 {
    margin-inline-end: 1rem !important; /* mirrors mr-3's 1rem value */
}

/* ==============================================
   Start select2 custom styles
   ============================================== */

.select2-container {
    min-width: 100px;
}

.select2-container--default .select2-selection--single {
    border: 0;
    border-radius: 0;
    background-color: #f7f8fe;
    font-size: 10px;
    min-height: 35px;
}

.select2-results__option {
    font-size: 10px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    padding-inline-start: 8px;
    padding-inline-end: 0;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #999;
    position: relative;
    top: 4px;
}

.select2 .selection {
    width: 100% !important;
}

/* Single select */
select.select2.is-invalid + .select2-container .select2-selection--single {
    border-color: #dc3545 !important;
}

/**** Start handle click icon and arrow *****/
/* Make space for clear (X) and arrow */
.select2-container--default .select2-selection--single {
    /*padding-right: 45px;*/
}

/* Clear (X) button */
.select2-container--default .select2-selection--single .select2-selection__clear {
    right: 4px;
    z-index: 2;
    cursor: pointer;
}

/* Dropdown arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 6px;
}

/* RTL support (Arabic) */
[dir="rtl"] .select2-container--default .select2-selection--single {
    padding-left: 0;
    padding-right: initial;
}

[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__clear {
    left: 30px;
    right: auto;
}

[dir="rtl"] .select2-container--default .select2-selection--single .select2-selection__arrow {
    left: 6px;
    right: auto;
}

/**** End handle click icon and arrow *****/

/* Apply invalid styling to the Select2 selection element
   when the original <select> has the .is-invalid class */
select.is-invalid ~ .select2-container .select2-selection--single,
select.is-invalid ~ .select2-container .select2-selection--multiple {
    /* Match Bootstrap's invalid border color */
    border-color: #dc3545 !important;

    /* Bootstrap invalid state icon */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");

    background-repeat: no-repeat;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* LTR: Place the validation icon on the right and reserve space for it */
:dir(ltr) select.is-invalid ~ .select2-container .select2-selection--single,
:dir(ltr) select.is-invalid ~ .select2-container .select2-selection--multiple {
    padding-right: calc(1.5em + 0.75rem);
    background-position: right calc(0.375em + 0.1875rem) center;
}

/* RTL: Mirror the layout by placing the icon on the left */
:dir(rtl) select.is-invalid ~ .select2-container .select2-selection--single,
:dir(rtl) select.is-invalid ~ .select2-container .select2-selection--multiple {
    padding-left: calc(1.5em + 0.75rem);
    background-position: left calc(0.375em + 0.1875rem) center;
}

/* =============================================
   End select2 custom styles
   ============================================= */

.appended-card-item {
    background-color: rgba(21, 97, 203, 0.1);
    height: auto;
    padding: 20px;
}

.add-new-card-item {
    cursor: pointer;
}

.remove-card-item-btn {
    font-size: 30px;
    margin-top: 35px;
    cursor: pointer
}

.google-map {
    border: 1px solid #ddd;
    border-radius: 8px;
}

.center-vertically {
    display: flex;
    align-items: center;
    min-height: 80px;
}

.coupon-items-wrapper,
.autocomplete-items-wrapper {
    height: 150px;
    overflow: auto;
}

.autocomplete-card {
    padding: 10px;
    background-color: #f5f5f5;
}

.table-scroll-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

/************ start upload **************/
.upload-item, .old-item {
    position: relative;
}

.upload-item .remove-new, .old-item .remove-old {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.8;
    transition: opacity 0.3s;
}

.upload-item:hover .remove-new, .old-item:hover .remove-old {
    opacity: 1;
}

.upload-img {
    max-height: 150px;
    object-fit: contain;
    width: 100%;
    background-color: #f8f9fa;
}

.file-count {
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Different border colors for different field types */
.preview.images .upload-item {
    border-left: 3px solid #3498db;
}

.photos .add-file-container {
    padding: 15px 50px;
    font-size: 18px;
    border-radius: 15px;
    border: 2px dashed #0073b690;
    margin-top: 30px;
    cursor: pointer;
}

.items .img .upload-img {
    max-height: unset;
}

.upload-files::before {
    background-color: unset;
}

.upload-files .items {
    margin-bottom: unset;
}

/********** end upload ***************/

.appended-card-item {
    position: relative;
}

.appended-card-item .remove-card-item-btn.absolute {
    position: absolute;
    top: 10px;
    inset-inline-end: 10px; /* replaces left/right automatically */
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.rate-section span.checked {
    color: orange;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

.font-100 {
    font-size: 100% !important;
}

.badge-spacing {
    margin-inline-end: 1px !important;
    margin-block-end: 1px !important;
    display: inline-block;
}

.badge-style {
    color: #fff !important;
    font-size: 9px;
}

/** Cropper **/
.cropper-container.cropper-bg {
    width: 770px !important;
}

.list-thumb {
    max-width: 45px;
    max-height: 45px;
    width: auto;
    height: auto;
    object-fit: contain; /* preserves aspect ratio, no cropping/stretching */
}

/* =============================================
   Start Custom Btn Styles
   ============================================= */
.custom_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 40px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
    letter-spacing: 0.01em;
}

/* light overlay on hover, dark press on active — works on any color */
.custom_btn::after {
    content: '';
    position: absolute;
    inset: 0; /* top/right/bottom/left = 0 */
    background: transparent;
    transition: background 0.12s ease;
    pointer-events: none;
}

.custom_btn:hover::after {
    background: rgba(255, 255, 255, 0.12);
}

.custom_btn:active {
    transform: scale(0.97);
}

.custom_btn:active::after {
    background: rgba(0, 0, 0, 0.08);
}

.custom_btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #378add;
}

.custom_btn:disabled,
.custom_btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── filled variants ── */
.custom_btn_blue {
    background: #185fa5;
    color: #fff;
}

.custom_btn_blue:hover {
    color: #fff;
    box-shadow: 0 2px 8px rgba(24, 95, 165, 0.30);
}

.custom_btn_red {
    background: #a32d2d;
    color: #fff;
}

.custom_btn_red:hover {
    box-shadow: 0 2px 8px rgba(163, 45, 45, 0.30);
}

/* ── ghost variants (secondary / destructive secondary) ── */
.custom_btn_ghost {
    background: transparent;
    color: #1a1a1a;
    border: 0.5px solid #aaa;
}

.custom_btn_ghost:hover {
    background: #f5f5f5;
}

.custom_btn_ghost::after {
    display: none;
}

.custom_btn_ghost_blue {
    background: transparent;
    color: #185fa5;
    border: 0.5px solid #85b7eb;
}

.custom_btn_ghost_blue:hover {
    background: #e6f1fb;
}

.custom_btn_ghost_blue::after {
    display: none;
}

.custom_btn_ghost_red {
    background: transparent;
    color: #a32d2d;
    border: 0.5px solid #f09595;
}

.custom_btn_ghost_red:hover {
    background: #fcebeb;
}

.custom_btn_ghost_red::after {
    display: none;
}

/* =============================================
   End Custom Btn Styles
   ============================================= */

.small-btn-list .cont {
    padding: 6px 15px;
    font-size: 10px;
}

.small-btn-list .shape {
    width: 70%;
}

/***************** Summary Card *******************/
.summary-card {
    border-radius: .5rem;
    transition: transform .15s ease;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
    flex-shrink: 0;
}
