:root {
    --ce-surface: #ffffff;
    --ce-surface-muted: #f8fafc;
    --ce-border: #d0d5dd;
    --ce-border-strong: #98a2b3;
    --ce-text: #1f2933;
    --ce-text-muted: #667085;
    --ce-accent: #2563eb;
    --ce-accent-soft: #eff4ff;
    --ce-success: #12b76a;
    --ce-warning: #f79009;
    --ce-radius: 10px;
    --ce-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.acf-office-selector .office-selection-component {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    width: 100%;
    padding: 18px;
    margin: 0;
    background: var(--ce-surface-muted);
    border-radius: var(--ce-radius);
    border: 1px solid var(--ce-border);
    box-shadow: var(--ce-shadow);
}

.acf-office-selector .office-selection-component .box {
    display: flex;
    flex-direction: column;
    flex: 1 1 340px;
    min-height: 320px;
    background: var(--ce-surface);
    border: 1px solid var(--ce-border);
    border-radius: var(--ce-radius);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.acf-office-selector .office-selection-component .box:hover {
    border-color: var(--ce-accent);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
}

.acf-office-selector .office-selection-component .box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--ce-text);
    background: linear-gradient(135deg, #f1f5ff 0%, #ffffff 90%);
    border-bottom: 1px solid var(--ce-border);
}

.acf-office-selector .office-selection-component .box-title i {
    color: var(--ce-accent);
}

.acf-office-selector .office-selection-component .box-content {
    position: relative;
    flex: 1 1 auto;
    padding: 0;
    background: var(--ce-surface);
}

.acf-office-selector .office-selection-component .box-content .loading,
.acf-office-selector .office-selection-component .box-content .loaded {
    height: 100%;
    width: 100%;
}

.acf-office-selector .office-selection-component .box-content .loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ce-text-muted);
    font-size: 14px;
    letter-spacing: 0.02em;
}

.acf-office-selector .office-selection-component .box-content .loaded {
    display: none;
    height: 100%;
}

.acf-office-selector .office-selection-component .box-content .loaded-ex,
.acf-office-selector .office-selection-component .box-content .c-loaded {
    height: 100%;
    overflow-y: auto;
}

.acf-office-selector .office-selection-component .box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.acf-office-selector .office-selection-component .box ul li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(208, 213, 221, 0.6);
    transition: background 0.2s ease, color 0.2s ease;
}

.acf-office-selector .office-selection-component .box ul li:last-child {
    border-bottom: none;
}

.acf-office-selector .office-selection-component .box ul li:hover {
    background: rgba(37, 99, 235, 0.08);
}

.acf-office-selector .office-selection-component .box ul li .left {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    gap: 10px;
    color: var(--ce-text);
}

.acf-office-selector .office-selection-component .box ul li .left label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.acf-office-selector .office-selection-component .box ul li .left .country-name {
    font-weight: 600;
    color: var(--ce-text);
}

.acf-office-selector .office-selection-component .box ul li .right {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 32px;
    color: var(--ce-text-muted);
}

.acf-office-selector .office-selection-component .box ul li .right i {
    display: none;
}

.acf-office-selector .office-selection-component .box ul li.profiling .right i.fa-circle-check {
    display: inline-block;
    color: var(--ce-success);
}

.acf-office-selector .office-selection-component .box ul li.notprofiling .right i.fa-circle-xmark {
    display: inline-block;
    color: var(--ce-border-strong);
}

.acf-office-selector .office-selection-component .box ul li.contact-list-li .right i {
    display: inline-block;
}

.acf-office-selector .office-selection-component .box ul li.notprofiling {
    color: var(--ce-text-muted);
    background: rgba(248, 250, 252, 0.6);
}

.acf-office-selector .office-selection-component .box ul li.profiling {
    color: var(--ce-text);
    background: rgba(18, 183, 106, 0.04);
}

.acf-office-selector .office-selection-component .box.office-selector .country-title {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ce-accent);
    background: var(--ce-accent-soft);
    border-bottom: 1px solid rgba(37, 99, 235, 0.16);
}

.acf-office-selector .office-selection-component .box.country-selector .goto-country {
    color: var(--ce-accent);
    padding: 0 4px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.acf-office-selector .office-selection-component .box.country-selector .goto-country:hover {
    color: var(--ce-text);
}

.acf-office-selector .office-selection-component .country-select {
    cursor: pointer;
}

.acf-office-selector .office-selection-component .box-content .c-loading,
.acf-office-selector .office-selection-component .box-content .c-loaded {
    height: 100%;
}

.acf-office-selector .office-selection-component .box-content .c-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ce-text-muted);
}

.acf-office-selector .office-selection-component .box .goto-country {
    font-size: 16px;
    line-height: 1;
}

.acf-office-selector .office-selection-component .box.office-selector .country-title .goto-country {
    font-weight: 700;
}

.acf-office-selector .office-selection-component .box-content .loaded,
.acf-office-selector .office-selection-component .box-content .loaded-ex {
    display: block;
}

.acf-office-selector .office-selection-component .box-content .loaded-ex::-webkit-scrollbar,
.acf-office-selector .office-selection-component .box-content .c-loaded::-webkit-scrollbar {
    width: 10px;
}

.acf-office-selector .office-selection-component .box-content .loaded-ex::-webkit-scrollbar-track,
.acf-office-selector .office-selection-component .box-content .c-loaded::-webkit-scrollbar-track {
    background: transparent;
}

.acf-office-selector .office-selection-component .box-content .loaded-ex::-webkit-scrollbar-thumb,
.acf-office-selector .office-selection-component .box-content .c-loaded::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 999px;
}

.acf-office-selector .office-selection-component .box-content .loaded-ex::-webkit-scrollbar-thumb:hover,
.acf-office-selector .office-selection-component .box-content .c-loaded::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.4);
}

@media (max-width: 960px) {
    .acf-office-selector .office-selection-component {
        padding: 14px;
    }

    .acf-office-selector .office-selection-component .box {
        flex: 1 1 100%;
    }
}

.office-selection-key {
    margin-top: 18px;
    display: grid;
    gap: 16px;
}

.office-selection-key .legend {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid rgba(208, 213, 221, 0.8);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.office-selection-key .legend-heading {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1f2933;
}

.office-selection-key .legend-items {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #475467;
}

.office-selection-key .legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(248, 250, 252, 0.7);
}

.office-selection-key .legend-item--profiling {
    background: rgba(18, 183, 106, 0.12);
    color: #047857;
}

.office-selection-key .legend-item--not-profiling {
    background: rgba(71, 84, 103, 0.08);
}

.office-selection-key .legend-item--not-profiling .legend-icon {
    color: #475467;
}

.office-selection-key .legend-item--profiling .legend-icon {
    color: #12b76a;
}

.office-selection-key .legend-item--navigate {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.office-selection-key .legend-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.office-selection-key .legend-label {
    font-weight: 500;
}

.office-selection-key .new-office-card {
    padding: 16px 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(255, 255, 255, 0.6));
    border: 1px solid rgba(37, 99, 235, 0.24);
    border-radius: 14px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
}

.office-selection-key .new-office-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.office-selection-key .new-office-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.office-selection-key .new-office-heading {
    font-size: 15px;
    font-weight: 600;
    color: #1d4ed8;
}

.office-selection-key .new-office-subheading {
    font-size: 13px;
    color: #3b82f6;
}

.office-selection-key .new-office-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.office-selection-key .new-office-button:hover,
.office-selection-key .new-office-button:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.24);
    color: #ffffff;
}

.office-selection-key .new-office-button i {
    font-size: 12px;
}

.office-selection-key .modal-form .row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 12px 0;
}

.office-selection-key .modal-form .row label {
    flex: 0 0 28%;
    font-size: 13px;
    font-weight: 600;
    color: #1f2933;
}

.office-selection-key .modal-form .row .row-right {
    flex: 1 1 auto;
}

.office-selection-key .modal-form .row .row-right input,
.office-selection-key .modal-form .row .row-right select {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #d0d5dd;
    padding: 8px 12px;
    font-size: 13px;
}

.office-selection-key .modal-form .row .row-right input:focus,
.office-selection-key .modal-form .row .row-right select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.office-selection-key .office-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 18px 0 10px;
}

.office-selection-key .office-footer input[type=button] {
    border-radius: 999px;
    border: none;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.office-selection-key .office-footer input[type=button].ok {
    background: #2563eb;
    color: #ffffff;
}

.office-selection-key .office-footer input[type=button].cancel-add-office-btn {
    background: rgba(15, 23, 42, 0.05);
    color: #475467;
}

.office-selection-key .office-footer input[type=button]:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

#TB_ajaxContent {
    width: 100% !important;
}

#TB_ajaxContent.modal-form-container {
    width: 100% !important;
}
