/* ==========================================================================
   {CODICTS} Save post relationships — popup UI
   ========================================================================== */

/* Dim overlay behind the popup */
.codicts-cvealw-popup.vx-popup.elementor {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.45);
    z-index: 999;
    transition: opacity 0.25s ease;
}

/* Popup shell — outer element only handles size/position, no visible chrome
   (otherwise its background shows as a grey strip below the inner white box). */
.codicts-cvealw-popup .ts-form {
    top: unset !important;
    left: unset !important;
    width: calc(100% - 32px) !important;
    max-width: 620px !important;
    position: fixed !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}
.codicts-cvealw-popup .ts-field-popup-container {
    padding: 0 !important;
}
/* The inner box is the actual card */
.codicts-cvealw-popup .ts-field-popup {
    background: #fff;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 24px 64px rgba(2, 6, 23, 0.28) !important;
}

/* Header */
.codicts-cvealw-popup .ts-popup-head {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.codicts-cvealw-popup .ts-popup-name {
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
}
.codicts-cvealw-popup .ts-popup-name svg,
.codicts-cvealw-popup .ts-popup-name i {
    width: 20px;
    height: 20px;
}

/* Search bar */
.codicts-cvealw-popup .ts-input-icon {
    gap: 10px;
    padding: 12px 18px;
}
.codicts-cvealw-popup .ts-input-icon svg,
.codicts-cvealw-popup .ts-input-icon i {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    flex: 0 0 auto;
}
.codicts-cvealw-popup .ts-input-icon input {
    border: none;
    box-shadow: none;
    width: 100%;
    font-size: 14px;
    background: transparent;
}

/* Content wrapper: header / search / list manage their own spacing, so strip
   the wrapper's default padding (removes the empty band below short lists). */
.codicts-cvealw-popup .ts-popup-content-wrapper {
    padding: 0 !important;
}

/* Results list — single-column list of clean selectable rows */
.codicts-cvealw-popup .ts-term-dropdown {
    max-height: min(60vh, 460px);
    overflow-y: auto;
}
.codicts-cvealw-popup .ts-term-dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    padding: 8px;
    margin: 0;
}
.codicts-cvealw-popup .ts-term-dropdown-list li {
    box-sizing: border-box;
}
.codicts-cvealw-popup .ts-term-dropdown-list li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}
.codicts-cvealw-popup .ts-term-dropdown-list li a:hover {
    background-color: rgba(15, 23, 42, 0.04);
}
/* Selected row gets a soft accent */
.codicts-cvealw-popup .ts-term-dropdown-list li.ts-selected a {
    background-color: rgba(79, 70, 229, 0.07);
    border-color: rgba(79, 70, 229, 0.25);
}
.codicts-cvealw-popup .ts-term-dropdown-list li a > span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    font-size: 14px;
}

/* Checkbox / radio + thumbnail alignment */
.codicts-cvealw-popup .ts-checkbox-container {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
.codicts-cvealw-popup .ts-term-image {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
}
.codicts-cvealw-popup .ts-term-image span,
.codicts-cvealw-popup .ts-term-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.codicts-cvealw-popup .ts-term-icon {
    flex: 0 0 auto;
    opacity: 0.55;
    width: 16px;
    height: 16px;
}

/* Empty / loading state */
.codicts-cvealw-popup .ts-term-dropdown-list li.ts-empty-user-tab {
    flex-direction: column;
    gap: 8px;
    padding: 32px 16px;
    text-align: center;
    opacity: 0.7;
}
.codicts-cvealw-popup .ts-empty-user-tab .ts-loader {
    margin: 24px auto;
}

/* Load more */
.codicts-cvealw-popup .n-load-more {
    display: flex;
    justify-content: center;
    padding: 6px 8px 10px;
}
