.one-person-root {
    display: flex;
    align-items: center;
}

.p-button.p-button-link.p-button-danger,
.p-button.p-button-link.p-button-danger:hover,
.p-button.p-button-link.p-button-danger:focus {
    color: var(--red);
}

.one-person-sidebar .field-radiobutton > input[type="radio"] {
    margin-right: 0.25rem;
    width: 1.25rem;
    height: 1.25rem;
    top: -2px;
}

.one-person-sidebar .field-radiobutton{
    margin-bottom: 0.5rem;
}

.one-person-sidebar input[type="text"] {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: .5rem .75rem;
}

.one-person-root > .one-value {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.one-person-root > .one-value.notfound {
    font-weight: bold;
    color: var(--orange, #f90);
}

.one-person-root > .one-value.ambiguous {
    font-weight: bold;
    color: #b45309;
}

.one-person-root > .one-value .subscription > .CONFIRMED.single {
    background: var(--green);
    color: white;
    border-radius: 50px;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 20px;
    margin-left: 0.25rem;
}
.one-person-root > .one-value .subscription > .CONFIRMED > * {
    font-size: 0.7rem;
}

.one-person-root i {
    cursor: pointer;
}

/* Popup styles */
.one-person-sidebar {
    min-width: min(100vw, 700px);
}

.one-popup {
    max-width: min(100vw, 800px);
    padding: 0;
}

.one-popup a {
    color: var(--primary-color);
    text-decoration: none;
}

.one-popup .warning {
    color: var(--orange);
}

.one-popup .profile-header {
    display: flex;
    align-items: center;
    /* border-bottom: 1px solid #ddd; */
    padding-bottom: 0.5rem;
}

.one-popup .ml-auto {
    margin-left: auto;
}

.one-popup .mb-3 {
    margin-bottom: 1rem;
}

.one-popup .mt-4 {
    margin-top: 1.5rem;
}

.one-popup .text-center {
    text-align: center;
}

.one-popup .flex {
    display: flex;
}

.one-popup .align-center {
    align-items: center;
}

.one-popup .icon-couple {
    background-image: url(/wp-content/plugins/wpplugin-onesime-profiles/assets/icon-w-couple.png);
    background-size: 90%;
    background-position: center;
    filter: invert(1);
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0px;
    border-radius: 4px;
}

.one-popup .p-button .icon-couple {
    filter: invert(0);
}

/* Diff table styles */
.one-popup table.diff-list {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.one-popup table.diff-list thead {
    background-color: #333;
    color: white;
}

.one-popup table.diff-list thead th {
    padding: 0.5rem;
}

.one-popup table.diff-list tbody tr {
    border-bottom: 1px solid #eee;
}

.one-popup table.diff-list tbody tr.diff > td.profile {
    color: var(--orange);
}

.one-popup table.diff-list tbody td.one.missing {
    background-color: var(--red);
    color: white;
}

.one-popup table.diff-list tbody tr .actions {
    display: flex;
    justify-content: center;
    align-items: center;
}

.one-popup table.diff-list tbody tr .actions > * {
    cursor: pointer;
    margin: 0 0.25rem;
}

.one-popup table.diff-list tbody td.one.photo img {
    height: 2rem;
}

.one-popup .loading-profile {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    flex-direction: column;
}

.one-popup .button.copy-photo {
    padding: 0.25rem 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Session header styles */
.one-popup .session-header {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.one-popup .inscr-couple,
.subscription .inscr-couple {
    background-image: url(/wp-content/plugins/wpplugin-onesime-profiles/assets/icon-w-couple.png);
    background-size: 90%;
    background-position: center;
    background-color: var(--green);
    width: 20px;
    height: 20px;
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0px;
    border-radius: 4px;
}

.one-popup .session-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.one-popup .session-id {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.one-popup .session-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 1rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 0.75rem;
}

.one-popup .session-info-item {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}

.one-popup .session-info-item i {
    margin-right: 0.5rem;
    /* color: var(--primary-color); */
}

.one-popup .session-link {
    display: inline-flex;
    align-items: center;
    /* color: var(--primary-color); */
    font-weight: 500;
    margin-top: 0.75rem;
    transition: color 0.2s;
}

.one-popup .session-link:hover {
    color: var(--primary-dark, #0056b3);
    text-decoration: underline;
}

.one-popup .session-link i {
    margin-left: 0.4rem;
}

/* Subscription data styles */
.one-popup .subscription-data {
    margin-top: 1rem;
    padding: 1.25rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.one-popup .subscription-data .description {
    margin: 1rem 0;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
}

.one-popup .subscription-data .field {
    margin-bottom: 1.25rem;
}

.one-popup .subscription-data .field label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.9rem;
}

.one-popup .subscription-data .field .p-dropdown {
    width: 100%;
}

.one-popup .subscription-data .actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.one-popup .subscription-data .p-button {
    margin-top: 0.5rem;
}

/* Search profile section styles */
.one-popup .search-profile-section {
    margin-top: 1rem;
    padding: 1.25rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.one-popup .mt-2 {
    margin-top: 0.5rem;
}

.one-popup .mb-3 {
    margin-bottom: 1rem;
}

.one-popup .ml-2 {
    margin-left: 0.5rem;
}

.one-popup .w-full {
    width: 100%;
}

.one-popup .search-profile-section .p-autocomplete {
    width: 100%;
}

.one-popup .ambiguous-match-section {
    margin-bottom: 1.25rem;
}

.one-popup .ambiguous-match-section h4 {
    margin: 0 0 0.5rem;
    color: #1e293b;
}

.one-popup .ambiguous-match-section > p {
    margin: 0;
    color: #475569;
    line-height: 1.45;
}

.one-popup .ambiguous-match-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.one-popup .ambiguous-match-card {
    border: 1px solid #dbe4ef;
    border-radius: 10px;
    padding: 1rem;
    background: #fff;
}

.one-popup .ambiguous-match-card.selected {
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.12);
}

.one-popup .candidate-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.one-popup .candidate-title-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.one-popup .candidate-title {
    font-weight: 600;
    color: #0f172a;
}

.one-popup .candidate-status-icon {
    font-size: 0.95rem;
}

.one-popup .candidate-status-icon.validated {
    color: #2563eb;
}

.one-popup .candidate-status-icon.unvalidated {
    color: #d97706;
}

.one-popup .candidate-subtitle {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 0.15rem;
}

.one-popup .candidate-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.35rem;
}

.one-popup .candidate-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 600;
}

.one-popup .candidate-meta-pill.ccn-status {
    background: #eff6ff;
    color: #1d4ed8;
}

.one-popup .candidate-meta-pill.marital {
    background: #f8fafc;
    color: #475569;
}

.one-popup .candidate-meta-pill.marital.married {
    background: #fef2f2;
    color: #be123c;
}

.one-popup .candidate-meta-pill.marital.divorced {
    background: #fff7ed;
    color: #c2410c;
}

.one-popup .candidate-meta-pill.marital.single,
.one-popup .candidate-meta-pill.marital.separated,
.one-popup .candidate-meta-pill.marital.widowed,
.one-popup .candidate-meta-pill.marital.unknown {
    background: #f1f5f9;
    color: #475569;
}

.one-popup .candidate-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.one-popup .candidate-field-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.one-popup .candidate-field-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    font-size: 0.84rem;
    border: 1px solid #dbe4ef;
    color: #334155;
    background: #f8fafc;
}

.one-popup .candidate-field-check.match {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #166534;
}

.one-popup .candidate-field-check.mismatch {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.one-popup .candidate-field-check.empty {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

.one-popup .ambiguous-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.one-popup .manual-search-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 0.5rem;
}

/* Utility classes */
.one-popup .text-center {
    text-align: center;
}

/* Profile photo styling */
.one-popup .profile-header-with-photo {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.one-popup .profile-header-with-photo h2 {
    margin: 0;
}

.one-popup .profile-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
    background-color: #f5f5f5;
    flex-shrink: 0;
}

.one-popup .profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Diff icon styling for not-equal */
.diff .diff-icon {
    position: relative;
}

.diff .diff-icon::after {
    content: '';
    background: var(--orange);
    position: absolute;
    top: -12%;
    left: 7px;
    width: 2px;
    height: 123%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
    color: inherit;
    transform: rotate(43deg);
}
/* Preview diff table styles */
.selected-profile-preview {
    background: #f8f9fa;
    border: 1px solid #e0e7ff;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.selected-profile-preview h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    color: #334155;
    font-weight: 600;
}

.preview-diff {
    width: 100%;
    font-size: 0.85rem;
    border-collapse: collapse;
}

.preview-diff thead {
    background: #f1f5f9;
}

.preview-diff th {
    padding: 0.5rem;
    text-align: left;
    font-weight: 600;
    /* border-bottom: 2px solid #cbd5e1; */
}

.preview-diff tbody tr {
    border-bottom: 1px solid #e2e8f0;
}

.preview-diff tbody tr:hover {
    background: #f1f5f9;
}

.preview-diff td {
    padding: 0.5rem;
    word-break: break-word;
}

.preview-diff td.profile {
    max-width: 150px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.8rem;
    color: #475569;
}

.preview-diff td.profile.missing {
    color: #cbd5e1;
    font-style: italic;
}

.preview-diff tr.diff td {
    background-color: #fef3c7;
}

/* External link in preview header */
.selected-profile-preview h4 a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9em;
    margin-left: 0.5rem;
}

.selected-profile-preview h4 a:hover {
    color: #475569;
}

.selected-profile-preview h4 a i {
    font-size: 0.8em;
}