/* OLA Create Ticket Modal — prefix ola-ctm* (không dùng class Support/Admin chung) */
.ola-ctm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 4100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.ola-ctm-backdrop.ola-ctm-is-open { display: flex; }
.ola-ctm-modal {
    width: 800px;
    height: 600px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    background: #fff;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: olaCtmIn 0.2s ease-out;
}
@keyframes olaCtmIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ola-ctm-header {
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}
.ola-ctm-header-main { min-width: 0; }
.ola-ctm-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0b57d0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ola-ctm-sub {
    margin: 3px 0 0;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
}
.ola-ctm-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #e2e8f0;
    color: #334155;
    cursor: pointer;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ola-ctm-close:hover { background: #cbd5e1; }
.ola-ctm-body {
    padding: 12px 16px 10px;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
}
.ola-ctm-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
}
.ola-ctm-grid:has(#olaCtmServiceWrap:not(.ola-ctm-svc-locked):not([hidden])) {
    grid-template-columns: 1fr 1fr;
}
.ola-ctm-col { min-width: 0; }
.ola-ctm-svc-locked { display: none !important; }
.ola-ctm-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ola-ctm-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 6px;
}
.ola-ctm-input,
.ola-ctm-select {
    width: 100%;
    height: 40px;
    min-height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0 2.25rem 0 0.85rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #135597;
    background: #fff;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4.6L6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}
.ola-ctm-input {
    padding-right: 12px;
    background-image: none;
    font-weight: 500;
}
.ola-ctm-input:focus,
.ola-ctm-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.ola-ctm-subject {
    display: flex;
    align-items: stretch;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.ola-ctm-subject:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.ola-ctm-subject .ola-ctm-input,
#olaCtmSubject {
    border: 0;
    box-shadow: none;
    height: 40px;
    font-weight: 700;
    font-size: 0.95rem;
}
.ola-ctm-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border-left: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
    white-space: nowrap;
}
.ola-ctm-count.ola-ctm-over { color: #dc2626; background: #fef2f2; }
.ola-ctm-composer { min-width: 0; }
.ola-ctm-composer .support-composer-actions:empty,
.ola-ctm-composer .scs-inline-actions:empty { display: none; }
.ola-ctm-composer:not(.is-ready) .support-reply-composer {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.ola-ctm-composer .support-composer-input {
    width: 100%;
    min-height: 108px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #1e293b;
    resize: vertical;
}
.ola-ctm-composer .scs-shell {
    --scs-input-h-compact: 108px;
    --scs-input-h-medium-max: 140px;
    --scs-input-h-large-max: 180px;
    margin-top: 0;
    background: #fff;
    overflow: visible;
}
.ola-ctm-composer .scs-input-inner,
.ola-ctm-composer .scs-field-row {
    min-height: 108px;
}
.ola-ctm-composer .scs-shell .sc-ed-field {
    font-size: 0.95rem;
}
.ola-ctm-composer .scs-shell[data-level="compact"] .sc-ed-field {
    min-height: 108px !important;
    max-height: 108px !important;
}
.ola-ctm-composer .support-emoji-btn {
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #65676b;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}
.ola-ctm-composer .support-emoji-btn:hover { background: #f0f2f5; color: #0068ff; }
.ola-ctm-composer .support-img-zone {
    width: 46px;
    height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.ola-ctm-composer .support-img-zone img,
.ola-ctm-composer .support-img-zone .js-preview-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}
.ola-ctm-composer .support-img-zone.has-img img,
.ola-ctm-composer .support-img-zone.has-video .js-preview-video { display: block; }
.ola-ctm-composer .support-img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}
.ola-ctm-composer .support-img-zone.has-img .support-img-overlay,
.ola-ctm-composer .support-img-zone.has-video .support-img-overlay { display: none; }
.ola-ctm-composer .support-img-del {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    font-size: 10px;
    z-index: 2;
}
.ola-ctm-composer .support-img-zone.has-img .support-img-del,
.ola-ctm-composer .support-img-zone.has-media .support-img-del { display: inline-flex; }
.ola-ctm-nudge {
    box-shadow: 0 0 0 3px rgba(11, 87, 208, 0.28) !important;
    outline: 2px solid #0b57d0;
    outline-offset: 2px;
}
.ola-ctm-file {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}
.ola-ctm-guest {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.ola-ctm-footer {
    padding: 10px 16px 12px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-shrink: 0;
    background: #fff;
}
.ola-ctm-captcha-wrap[hidden],
.ola-ctm-captcha-wrap[data-ola-ctm-on="0"] { display: none !important; }
.ola-ctm-captcha-label {
    display: block;
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ola-ctm-captcha {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ola-ctm-captcha img {
    width: 108px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    background: #f8fafc;
    flex-shrink: 0;
}
.ola-ctm-captcha img:hover { border-color: #93c5fd; }
.ola-ctm-captcha-refresh {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.ola-ctm-captcha-refresh:hover {
    border-color: #93c5fd;
    color: #0b57d0;
    background: #eff6ff;
}
.ola-ctm-captcha-refresh svg { width: 18px; height: 18px; display: block; }
.ola-ctm-captcha input {
    width: 92px;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
    color: #0f172a;
    background: #fff;
}
.ola-ctm-captcha input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.ola-ctm-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    margin-left: auto;
}
.ola-ctm-btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #0f172a;
}
.ola-ctm-btn-primary {
    background: #0b57d0;
    border-color: #0b57d0;
    color: #fff;
}
.ola-ctm-btn-primary:disabled { opacity: 0.65; cursor: wait; }
.ola-ctm-err {
    color: #b91c1c;
    font-size: 0.82rem;
    margin: 0 0 10px;
    display: none;
}
.ola-ctm-err.ola-ctm-show { display: block; }

/* Select2 — cùng cảm giác Admin / Support (40px, #e2e8f0, focus xanh) */
.ola-ctm-backdrop .select2-container,
.ola-ctm-backdrop .select2-container.ola-ctm-s2 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}
.ola-ctm-backdrop .ola-ctm-s2 .select2-selection--single,
.ola-ctm-backdrop .select2-container .select2-selection--single {
    height: 40px !important;
    min-height: 40px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background: #fff !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
}
.ola-ctm-backdrop .ola-ctm-s2 .select2-selection__rendered,
.ola-ctm-backdrop .select2-container .select2-selection__rendered {
    line-height: 38px !important;
    padding: 0 2.25rem 0 0.85rem !important;
    color: #135597 !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.ola-ctm-backdrop .ola-ctm-s2 .select2-selection__placeholder {
    color: #999 !important;
    font-weight: 500 !important;
}
.ola-ctm-backdrop .ola-ctm-s2 .select2-selection__arrow,
.ola-ctm-backdrop .select2-container .select2-selection__arrow {
    height: 40px !important;
    top: 0 !important;
    right: 6px !important;
}
.ola-ctm-backdrop .ola-ctm-s2 .select2-selection__arrow b {
    border-color: #6b7280 transparent transparent transparent !important;
    margin-top: -2px !important;
}
.ola-ctm-backdrop .select2-container--open .select2-selection--single,
.ola-ctm-backdrop .select2-container--focus .select2-selection--single {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}
.ola-ctm-s2-drop {
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1) !important;
    overflow: hidden;
    margin-top: 4px;
    z-index: 4200 !important;
}
.ola-ctm-s2-drop .select2-search--dropdown {
    padding: 8px;
    background: #fff;
}
.ola-ctm-s2-drop .select2-search--dropdown .select2-search__field {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0.5rem 0.75rem !important;
    outline: none;
    width: 100% !important;
    box-sizing: border-box;
}
.ola-ctm-s2-drop .select2-search--dropdown .select2-search__field:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}
.ola-ctm-s2-drop .select2-results__options { max-height: 260px !important; }
.ola-ctm-s2-drop .select2-results__option {
    padding: 10px 16px !important;
    font-size: 0.9375rem !important;
    color: #334155 !important;
    background-color: #fff !important;
}
.ola-ctm-s2-drop .select2-results__option--highlighted.select2-results__option--selectable,
.ola-ctm-s2-drop .select2-results__option--highlighted[aria-selected] {
    background-color: #e7f1ff !important;
    color: #1d4ed8 !important;
}
.ola-ctm-s2-drop .select2-results__option[aria-selected="true"] {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 600 !important;
}
.select2-container--open { z-index: 4200; }

html.ola-ctm-lock,
html.ola-ctm-lock body {
    overflow: hidden !important;
}
.ola-ctm-swal { z-index: 4300 !important; }
.ola-ctm-swal .swal2-popup,
.ola-ctm-swal-card {
    border-radius: 16px !important;
    border: 1px solid #cbd5e1 !important;
    overflow: hidden !important;
    box-shadow: 0 22px 48px -12px rgba(15, 23, 42, 0.28) !important;
}
.ola-ctm-swal .swal2-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}
.ola-ctm-swal .swal2-html-container {
    color: #475569 !important;
    line-height: 1.55 !important;
}
.ola-ctm-swal .swal2-confirm {
    border-radius: 10px !important;
    border: 1px solid #4f46e5 !important;
}
html.ola-ctm-chat-lock,
html.ola-ctm-chat-lock body {
    overflow: hidden !important;
}
.ola-ctm-chat-ov {
    position: fixed;
    inset: 0;
    z-index: 4400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.ola-ctm-chat-win {
    width: 800px;
    height: 600px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    background: #fff;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: olaCtmIn 0.2s ease-out;
}
.ola-ctm-chat-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px 10px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border-bottom: 1px solid #e2e8f0;
}
.ola-ctm-chat-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}
.ola-ctm-chat-x {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    line-height: 1;
}
.ola-ctm-chat-x:hover,
.ola-ctm-chat-x:focus-visible {
    background: #e2e8f0;
    color: #0f172a;
}
.ola-ctm-chat-body {
    flex: 1 1 auto;
    min-height: 0;
    background: #fff;
}
.ola-ctm-chat-body iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
@media (max-width: 991.98px) {
    .ola-ctm-grid,
    .ola-ctm-guest { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .ola-ctm-modal {
        width: 100%;
        height: calc(100vh - 24px);
        max-height: calc(100vh - 24px);
    }
    .ola-ctm-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .ola-ctm-footer-actions { margin-left: 0; }
}
