.law-firm-container .portrait-frame {
    background-color: #fff;
}

.law-firm-container .portrait-frame .attorney-portrait {
    width: 100%;
}


/* Overview Areas of Specialty: expandable items */
.overview-areas-of-specialty-list {
    list-style: none;
    padding-left: 0;
    font-size: 0.875rem;
}

.overview-areas-item {
    margin-bottom: 0.25em;
    --svg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23000' d='M3 0v3H0v2h3v3h2V5h3V3H5V0z'/%3E%3C/svg%3E");
}

.overview-areas-toggle {
    position: relative;
    display: inline-block;
    padding-left: 14px;
    font-weight: normal;
    line-height: 1.5;
    text-decoration: none;
    color: inherit;
    font-size: inherit;
}

.overview-areas-item.acc-open {
    --svg-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Cpath fill='%23000' d='M0 3v2h8V3z'/%3E%3C/svg%3E");
}

/* SVG icons on anchor ::before (plus/minus); position absolute, no flex */
.overview-areas-toggle::before {
    content: "";
    position: absolute;
    left: 0;
    top: calc(0.875rem * .75 - 4px);
    width: 10px;
    height: 10px;
    background: var(--svg-icon) no-repeat center;
    background-size: contain;
}

/* Text via ::after; label used in both states (no duplication) */
.overview-areas-toggle::after {
    content: attr(data-collapsed);
}

.overview-areas-item.acc-open .overview-areas-toggle::after {
    content: attr(data-expanded);
}

.overview-areas-acc {
    margin-left: 1.5em;
    margin-top: 0.25em;
}

.overview-areas-lawyers {
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
    font-size: inherit;
}

/* Specialty certifications section: lawyer name list */
.lawfirm-cert-all-box {
    margin: 0.15em 0 0.35em;
    font-size: 0.875rem;
}

/* Back to profile link in sidebar: full width (overrides 33% pf-nav-link) */
div.law-firm-container a.pf-nav-link.backtoprofile {
    flex: 0 1 100%;
}

/* People List modal: table styles */
#edit_people_sections .lawfirm-people-list-table {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border: 1px solid #e8e8e8;
}

#edit_people_sections .lawfirm-people-list-table th,
#edit_people_sections .lawfirm-people-list-table td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
    border: 1px solid #e8e8e8;
}

#edit_people_sections .lawfirm-people-list-table thead th {
    background-color: #f5f5f5;
    font-weight: 600;
}

#edit_people_sections .lawfirm-people-list-table .button {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    margin-bottom: 0;
}

#edit_people_sections .lawfirm-people-list-table .actions-cell .button+.button {
    margin-left: 0.35rem;
}

/* Edit Person modal: readonly Name field */
#edit_person_dialog .readonly-input {
    background-color: #f1f1f1;
    cursor: default;
}

#edit_person_dialog input {
    margin-bottom: 0;
}

#edit_person_dialog .epModal-inner .grid-x .cell {
    margin-bottom: 0.75rem;
}

#edit_person_dialog .epModal-inner .grid-x .cell:last-of-type {
    margin-bottom: 0;
}

/* Remove person confirmation: wider so message and button stay on one line */
#remove_person_confirm_dialog.remove-person-confirm-dialog {
    min-width: 26rem;
    width: 90%;
    max-width: 40rem;
}

/* Buttons side by side with small gap */
#remove_person_confirm_dialog .remove-person-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

#remove_person_confirm_dialog .remove-person-buttons .button {
    white-space: nowrap;
}

/* Add Person modal */
#people_section_add_form_dialog .add-person-search-results:empty{
    display: none;
}

#people_section_add_form_dialog .add-person-search-results {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    z-index: 99;
    max-height: 12rem;
    overflow-y: auto;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    margin-top: 0.25rem;
    background-color: #fff;
}

#people_section_add_form_dialog .add-person-search-option {
    display: block;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #efefef;
    line-height: 1.2;
    font-size: 0.875rem;
}

#people_section_add_form_dialog .add-person-search-option:hover {
    background-color: #eee;
    text-decoration: none;
    color: #0000ff;
}

#people_section_add_form_dialog .add-person-search-option:last-child {
    border-bottom: 0;
}

#people_section_add_form_dialog .add-person-search-option .sub {
    color: #666;
}

#people_section_add_form_dialog .add-person-suggested-results {
    max-height: 60vh;
    overflow: auto;
    border: 0;
    border-radius: 0;
    padding: 0;
}

/* Suggested list: same card layout as law firm setup wizard (setup_wizard_attorney_entry) */
.attorney-list {
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 4px;
    background-color: #fafafa;
    --grid-col-gap: 1.25rem;
}

.attorney-entry {
    border: 1px solid #ddd;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
    transition: background-color 0.2s, border-color 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    position: relative;
    background-color: white;
}

.attorney-list .cell:last-child .attorney-entry {
    margin-bottom: 0;
}

.attorney-entry:hover {
    background-color: #f5f5f5;
}

.attorney-entry.selected {
    background-color: #f0f7ff;
    border-color: #1779ba;
}

.attorney-entry .attorney-photo {
    width: 175px;
    height: 175px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #ddd;
    margin-right: 10px;
}

.attorney-entry .attorney-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.attorney-entry .checkbox-container {
    position: absolute;
    top: 10px;
    right: 10px;
}

.attorney-entry .checkbox-container.left {
    position: relative;
    top: auto;
    right: auto;
    margin-right: 10px;
    margin-top: 10px;

    @media only screen and (max-width: 640px) {
        margin-right: 5px;
        margin-top: 0;
    }
}

.attorney-entry .checkbox-container input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
}

.attorney-entry .external-link {
    font-weight: bold;
    color: #1779ba;
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    line-height: 1.2;
}

.attorney-entry .position-badge {
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    color: #333;
}

.attorney-entry .address-details {
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.4;
    color: #666;
}

.attorney-entry .contact-details {
    margin-bottom: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.attorney-entry .phone-item,
.attorney-entry .website-item {
    margin-bottom: 3px;
    display: flex;
}

.attorney-entry .website-url {
    word-break: break-all;
}

.attorney-entry .phone-label,
.attorney-entry .website-label {
    font-weight: 600;
    color: #555;
    margin-right: 6px;
    min-width: 70px;
}

.add-person-suggested-results .attorney-photo {
    width: 100px;
    height: 100px;
    flex-shrink: 0;

    @media only screen and (max-width: 640px) {
        width: 50px;
        height: 50px;
    }
}

.add-person-suggested-results .grid-padding-x {
    margin-left: -10px;
    margin-right: -10px;
}

.add-person-suggested-results .grid-padding-x>.cell{
    padding-left: 10px;
    padding-right: 10px;
}

.lawfirm-location-edit-row + .lawfirm-location-edit-row{
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.firm-site-link {
    word-break: break-all;
}