/*
 * @Author: Dicky Ermawan S 
 * @Profile: https://www.linkedin.com/in/dickyermawan/ 
 * @Date: 2024-11-26 11:29:19 
 * @Last Modified by: Dicky Ermawan S
 * @Last Modified time: 2025-10-07 00:54:41
 */

.kedip {
    animation: blink-animation 1s steps(5, start) infinite;
    -webkit-animation: blink-animation 1s steps(5, start) infinite;
}

@keyframes blink-animation {
    to {
        visibility: hidden;
    }
}

@-webkit-keyframes blink-animation {
    to {
        visibility: hidden;
    }
}


.card .card-header {
    min-height: 55px !important;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
    cursor: no-drop !important;
}

input[readonly] {
    cursor: no-drop !important;
    background-color: #e9ecef !important;
}

form .col-form-label {
    font-size: smaller;
}


.select2.select2-container {
    width: 100% !important;
}

.card .card-header .card-title,
.card .card-header .card-title .card-label {
    font-size: 1.175rem !important;
}

.card-border-tipis {
    box-shadow: unset !important;
    border-radius: unset !important;
    border: solid 1px #c1c1c1;
}

.redactor-toolbar {
    z-index: unset !important;
}

.table-abu th {
    background-color: #f1f1f1 !important;
}

.table-secondary {
    --bs-table-bg: #f4f4f4 !important;
}

form td .mb-3.row {
    margin-bottom: 0.2rem !important;
}


/* select2 multiple  */
.select2-selection.select2-selection--multiple.form-control.form-control-sm.select2-selection--clearable {
    padding-top: 3px;
    padding-right: 3px;
    /* padding-bottom: 3px; */
    padding-left: 3px;
}

.select2-selection.select2-selection--multiple.form-control.form-control-sm.select2-selection--clearable {
    /* display: inline-block; */
    vertical-align: top;
}

.select2-selection__rendered {
    display: list-item !important;
}

.select2-container.select2-container--bootstrap.select2-container--open {
    z-index: 9999;
}

.select2.select2-container.select2-container--bootstrap.select2-container--focus>span:first-of-type {
    height: 100%;
    /* Mengikuti tinggi elemen parent */
    display: flex;
    /* Agar isi tetap rapi */
    align-items: center;
    /* Vertikal tengah */
    box-sizing: border-box;
    /* Menyertakan padding dalam tinggi total */
}

.select2-search__field {
    margin-left: 0px !important;
    margin-bottom: 0px !important;
}

.select2-container--bootstrap.input-sm .select2-selection--multiple .select2-search--inline .select2-search__field,
.input-group-sm .select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field,
.form-group-sm .select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field {
    /* font-size: 12px;
    height: 28px; */
    line-height: 0.5 !important;
}

.select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field {
    height: unset;
}

/* form select .mb-3.row textarea {
    margin-bottom: 0px !important;
} */


/* btn simpan layanan  */
.btn-float {
    position: fixed;
    bottom: 40px;
    right: 50px;
    /* background-color: #25d366; */
    color: #FFF;
    text-align: center;
    box-shadow: 2.5px 2.5px 5px #999;
    z-index: 100;
}


.form-check {
    /* display: block;
    min-height: 1.5rem;
    padding-left: 2.25rem; */
    margin-bottom: 0.425rem !important;
}

.overlay.overlay-block {
    cursor: unset;
}

.overlay .overlay-layer {
    cursor: no-drop !important;
}

td.day.tanggal-merah {
    background-color: #F8285A !important;
    color: #000000 !important;
}

td.day.disabled {
    background-color: #F8285A !important;
    /* background-color: #ed8537 !important; */
    color: #000000 !important;
    cursor: no-drop !important;
}

.hint {
    font-size: 12px;
    color: #64748b;
    margin: 6px 0 0;
}

/* .ai-lock { overflow: hidden; }
.ai-backdrop {
position: fixed; inset: 0; z-index: 99999;
background: rgba(0,0,0,.45);
display: flex; align-items: center; justify-content: center;
opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.ai-backdrop.show { opacity: 1; pointer-events: auto; }
.ai-backdrop-box {
background: #fff; padding: 14px 16px; border-radius: 12px;
box-shadow: 0 10px 30px rgba(0,0,0,.25);
display: flex; align-items: center; gap: 10px;
font: 600 14px/1.3 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
} */

.card-okupasi-ama {
    position: relative;
    /* penting agar backdrop absolute menempel */
}

.ai-backdrop {
    position: absolute;
    /* bukan fixed */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    /* Changed from center to flex-start */
    justify-content: center;
    padding-top: 20px;
    /* Add padding from top */
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    overflow-y: auto;
    /* Allow scroll if needed */
}

.ai-backdrop.show {
    opacity: 1;
}

.card-okupasi-ama.ai-lock {
    pointer-events: none;
    /* opsional: biar tidak bisa klik isi card saat loading */
}

.ai-backdrop-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 245, 255, 0.98));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    padding: 24px 32px;
    min-width: 420px;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 20px;
    /* Stick to top when scrolling */
    margin-bottom: 20px;
}

.ai-backdrop-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.1);
}

.ai-backdrop-title {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.ai-backdrop-progress {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-progress-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.ai-progress-item i {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.ai-progress-item span {
    font-size: 14px;
    color: #475569;
    font-weight: 500;
}

.ai-backdrop-bar {
    width: 100%;
    height: 6px;
    background: rgba(203, 213, 225, 0.4);
    border-radius: 999px;
    overflow: hidden;
    margin: 16px 0 12px;
}

.ai-backdrop-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 999px;
    transition: width 0.4s ease;
}

.ai-backdrop-text {
    font-size: 13px;
    color: #64748b;
    margin-top: 8px;
    display: block;
}

/* .ai-backdrop-box {
  display: flex;
  flex-direction: column;     
  align-items: center;
  justify-content: flex-start; 
  padding-top: 50px;           
  gap: 12px;                   
  text-align: center;
} */


/* fix invalid yg kadang gak tampil  */
.mb-3:has(.form-control[aria-invalid="true"]) .invalid-feedback:not(:empty) {
    display: block;
}

/* ================================
   FLOATING AI INDICATOR (NON-BLOCKING)
   ================================ */

.floating-ai-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 280px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.98));
    backdrop-filter: blur(12px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    opacity: 0;
    transform: translateX(320px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.floating-ai-indicator.show {
    opacity: 1;
    transform: translateX(0);
}

.floating-ai-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

.floating-ai-header i {
    font-size: 16px;
    color: #ffffff;
}

.floating-ai-header span {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.floating-ai-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 4px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.floating-ai-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.floating-ai-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.floating-ai-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.floating-ai-item i {
    font-size: 14px;
    min-width: 18px;
    text-align: center;
}

.floating-ai-item span {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    flex: 1;
}

.floating-ai-item:has(.fa-spinner) {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

.floating-ai-item:has(.fa-check-circle) {
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.2);
}

@media (max-width: 768px) {
    .floating-ai-indicator {
        right: 10px;
        width: 240px;
    }
}

/* AI Thinking Stream Display */
.ai-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.ai-status span {
    font-size: 13px;
    color: #475569;
    font-weight: 500;
    flex: 1;
}

.ai-thinking-stream {
    margin-top: 8px;
    padding: 10px;
    background: rgba(249, 250, 251, 0.8);
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    max-height: 150px;
    overflow-y: auto;
}

.thinking-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thinking-label i {
    color: #8b5cf6;
    animation: pulse-brain 1.5s ease-in-out infinite;
}

@keyframes pulse-brain {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.stream-content {
    font-size: 12px;
    line-height: 1.6;
    color: #334155;
    font-family: 'Courier New', monospace;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chunk-text {
    display: inline;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scrollbar styling for stream content */
.ai-thinking-stream::-webkit-scrollbar {
    width: 4px;
}

.ai-thinking-stream::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 4px;
}

.ai-thinking-stream::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.5);
    border-radius: 4px;
}

.ai-thinking-stream::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

.card .card-footer {
    padding: 6.5px 13px;
}

/* ================================
   COMPACT FOOTER
   ================================ */

:root {
    --bs-app-footer-height: 36px !important;
}

#kt_app_footer.app-footer {
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
}

@media (min-width: 992px) {
    #kt_app_footer.app-footer {
        height: 36px !important;
        min-height: 36px !important;
        max-height: 36px !important;
    }
}


#kt_app_toolbar {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}