/* Custom CSS for Theme Changes */


:root {
    --pc-them-gray: #EEEEEE;
    --pc-them-pink: #DDAED3;
    --pc-them-light-blue: #6594B1;
    --pc-theme-blue: #213C51;
}


.pc-header .pc-h-item {
    min-height: 60px;
}

.pc-container {
    top: 60px;
}

.form-control,
.ts-control {
    border-radius: 10px;
    padding: .5rem 1rem;
}

.plugin-clear_button.form-select .clear-button,
.plugin-clear_button.single .clear-button {
    right: max(1rem, .75rem);
}

.plugin-clear_button .clear-button {
    top: 40%;
    font-size: 20px;
}

.form-control.error,
.form-select.error {
    border-color: #dc2626;
    border-style: dashed;
}

select.form-control[readonly],
.form-control[readonly] {
    opacity: 0.6;
    background: #f5f5f7;
    border-color: #bdc7cf;
}


.ts-dropdown .option.selected,
.ts-dropdown .option.active {
    background-color: #d6d6d6 !important;
    color: #000000 !important;
}

/* .ts-wrapper.form-control.invalid,
.ts-wrapper.form-select.invalid {
    border-style: dashed;
    border-color: #db2627;
} */

/* jQuery Validation System Styling */
.form-control.is-invalid {
    border-style: dashed !important;
    background-image: none !important;
    padding-right: 0.75rem !important;
}

.invalid-feedback {
    margin-left: 5px;
}

.was-validated .form-control:invalid:focus,
.form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.1rem rgba(220, 38, 38, 0.25) !important;
}

.btn-theme-primary:hover,
.btn-theme-danger:hover,
.btn-theme-light:hover,
.btn-theme-info:hover,
.btn-theme-warning:hover,
.btn-theme-success:hover,
.btn-theme-primary:active,
.btn-theme-danger:active,
.btn-theme-light:active,
.btn-theme-info:active,
.btn-theme-warning:active,
.btn-theme-success:active {
    filter: brightness(0.9);
    /* Use brightness filter instead of changing background to prevent flicker */
    /* box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.3) !important; */
    box-shadow: inset 0 3px 6px rgb(96 96 96 / 24%) !important;
}

.btn-theme-primary:active,
.btn-theme-danger:active,
.btn-theme-light:active,
.btn-theme-info:active,
.btn-theme-warning:active,
.btn-theme-success:active {
    transform: translateY(2px) !important;
}

.btn-theme-primary {
    background-color: #333 !important;
    /* Base color for transition */
    background: linear-gradient(145deg, #606060, #1a1a1a) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1) !important;
}


/* Danger Version (Red Gradient) */
.btn-theme-danger {
    background: linear-gradient(145deg, #dc2626, #8b0000) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}


/* Light Version (White/Gray Gradient) */
.btn-theme-light {
    background: linear-gradient(145deg, #ffffff, #e7e7e7) !important;
    color: #333333 !important;
    border: 1px solid #d1d1d1 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}


/* Info Version (Blue Gradient) */
.btn-theme-info {
    background: linear-gradient(145deg, #0dcaf0, #0aa2c0) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(13, 202, 240, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}


/* Warning Version (Orange/Yellow Gradient) */
.btn-theme-warning {
    background: linear-gradient(145deg, #ffc107, #e0a800) !important;
    color: #333333 !important;
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3) !important;
}


/* Success Version (Green Gradient) */
.btn-theme-success {
    background: linear-gradient(145deg, #28a745, #1e7e34) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
}


.btn-theme-primary,
.btn-theme-danger,
.btn-theme-light,
.btn-theme-info,
.btn-theme-warning,
.btn-theme-success {
    border-radius: 10px !important;
    transition: all 0.3s ease !important;
    padding: 6px 25px !important;
    font-weight: 500 !important;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.btn-theme-sm {
    border-radius: 10px !important;
    padding: 5px 15px !important;
}

.border-dashed {
    border-style: dashed !important;
}

.border-theme-info {
    border-color: #0dcaf0 !important;
}

.border-theme-primary {
    border-color: #4680ff !important;
}

.border-theme-warning {
    border-color: #ffc107 !important;
}

.border-theme-danger {
    border-color: #dc2626 !important;
}

.border-theme-success {
    border-color: #28a745 !important;
}

.no-input {
    background: transparent !important;
    border-color: transparent !important;
    opacity: 1 !important;
}


.custom-tom-select .ts-control {
    border-radius: 10px;
    padding: .5rem 1rem !important;
    color: #343a40;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.5;
}

/* Responsive Table for Repeater */
@media (max-width: 767px) {
    .table-repeater-responsive {
        border: none !important;
    }

    .table-repeater-responsive thead {
        display: none !important;
    }

    .table-repeater-responsive tbody,
    .table-repeater-responsive tr,
    .table-repeater-responsive td {
        display: block !important;
        width: 100% !important;
    }

    .table-repeater-responsive tr {
        margin-top: 15px !important;
        border: 1px solid #e3e6f0 !important;
        padding: 2px 8px !important;
        border-radius: 12px !important;
        background: #fff !important;
        box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
        display: flex !important;
        flex-wrap: wrap !important;
    }

    .table-repeater-responsive td {
        padding: 8px 0 !important;
        border: none !important;
    }

    /* Item: Row 1 */
    .table-repeater-responsive td:nth-child(1) {
        order: 1 !important;
        width: 100% !important;
        border-bottom: 1px solid #f8f9fc !important;
        /* margin-bottom: 10px !important; */
    }

    /* Qty: Row 2 Left */
    .table-repeater-responsive td:nth-child(2) {
        order: 2 !important;
        width: 50% !important;
        padding-right: 10px !important;
        padding-top: 0px !important;
    }

    /* Unit: Row 2 Right */
    .table-repeater-responsive td:nth-child(3) {
        order: 3 !important;
        width: 50% !important;
        padding-top: 0px !important;
    }

    /* Remark: Row 3 Left */
    .table-repeater-responsive td:nth-child(4) {
        order: 4 !important;
        width: 80% !important;
        border-top: 1px solid #f8f9fc !important;
        /* margin-top: 10px !important; */
        padding-top: 0px !important;
    }

    /* Action: Row 3 Right */
    .table-repeater-responsive td:nth-child(5) {
        order: 5 !important;
        width: 20% !important;
        border-top: 1px solid #f8f9fc !important;
        /* margin-top: 10px !important; */
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        padding-top: 0px !important;
    }
}