.abfm-container {
    margin: 2rem auto;
    display: flex;
    justify-content: center;
}

.abfm-form-wrapper {
    display: flex;
    flex-direction: column;
    text-align: center;
}

label {
    padding-top: 10px;
}

.physician-details-content {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.abfm-form-input {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.abfm-required-star {
    color: var(--color-error);
    margin-left: 2px;
}

.abfm-field-hint {
    margin: 2px 0 0 0;
    font-size: 0.85em;
    color: color-mix(in srgb, var(--color-text) 75%, var(--color-container-bg));
}

.abfm-form-note {
    margin: 0 0 16px 0;
    font-size: 0.9em;
    color: var(--color-text);
}

.hidden {
    display: none !important;
}

.form-button {
    width: auto;
    margin: 20px auto;
    text-align: center;
    letter-spacing: 0.12em;
}

.form-button:disabled,
.form-button:disabled:hover,
.form-button:disabled:focus {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    outline: none !important;
    box-shadow: none !important;
}

#results-controls {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 18px;
}

.results-control-select {
    font: inherit;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0 2px;
    -webkit-appearance: none;
    appearance: none;
}

.page-size-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding-top: 0;
}

.page-size-arrow {
    font-size: 0.65em;
}

.results-control-divider {
    color: var(--color-border);
}

#pagination-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-container {
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 20px;
}

.legend-section {
    flex: 1;
    text-align: left;
}

.legend-section-side {
    flex: 1;
    display: flex;
    flex-direction: row;
}

.legend-section ul {
    list-style: none;
    padding-left: 16px;
    margin: 0px;
}

ul {
    color: var(--color-primary);
    list-style: square;
    list-style-position: inside;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--color-primary);
    cursor: pointer;
}

#diplomate-form input:not([type="checkbox"]),
#diplomate-form select {
    font: inherit;
    width: 100%;
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

#resultsTable {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

#resultsTable th,
#resultsTable td {
    padding: 8px;
    text-align: center;
    border: 1px solid var(--color-border);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#resultsTable th {
    white-space: normal;
    text-overflow: clip;
    word-break: break-word;
}

.th-icon {
    display: none;
}

.resultTableHeader,
#resultsHeader {
    background: var(--color-primary);
    color: #fff;
}

.odd-row {
    background-color: color-mix(in srgb, var(--color-border) 40%, var(--color-container-bg));
}

.even-row {
    background-color: var(--color-container-bg);
}

#resultsTable th.resultTableHeader:nth-child(2),
#resultsTable td:nth-child(2) {
    width: 30%;
    text-align: left;
}

#resultsTable th.resultTableHeader:not(:nth-child(2)),
#resultsTable td:not(:nth-child(2)) {
    width: 7%;
}

#resultsTable td:nth-child(2) {
    white-space: normal;
    word-wrap: break-word;
}

.abfm-physician-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary);
    cursor: pointer;
    font-size: inherit;
    text-decoration: underline;
    text-align: left;
}

.abfm-physician-link:hover {
    color: color-mix(in srgb, var(--color-primary) 70%, #000);
}

.loading-div {
    display: flex;
    width: 100%;
    min-height: 200px;
    justify-content: center;
    align-items: center;
    padding: 60px 0;
}

.spinner-loader {
    width: 48px;
    height: 48px;
    border: 5px solid;
    border-color: var(--color-accent) transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.details-table th,
.details-table td {
    padding: 8px;
    border: 1px solid var(--color-border);
    text-align: left;
}

.details-table thead tr {
    background: var(--color-primary);
    color: #fff;
}

.abfm-comment-panel {
    display: none;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--color-site-bg);
    border-left: 3px solid var(--color-primary);
    border-radius: 2px;
    font-size: 0.9em;
    color: var(--color-text);
}

.abfm-comment-panel.open {
    display: block;
}

.abfm-cert-comment {
    cursor: pointer;
}

#resultsTable.hide-state .state-col {
    display: none;
}

@media (max-width: 1000px) {
    .th-text {
        display: none;
    }

    .th-icon {
        display: inline;
    }

    .abfm-form-wrapper,
    .abfm-form-wrapper-extended {
        width: 100%;
    }

    .legend-container {
        flex-direction: column;
    }

    .abfm-form-columns {
        flex-direction: column !important;
    }

    .abfm-form-col-divider {
        border-left: none !important;
        border-right: none !important;
        border-top: 2px solid var(--color-border);
        border-bottom: 2px solid var(--color-border);
    }
}

@media (max-width: 660px) {
    .legend-section-side {
        flex-direction: column;
    }

    #search-div {
        overflow-x: auto;
    }

    #resultsTable th,
    #resultsTable td {
        padding: 4px;
        font-size: 14px;
    }

    .abfm-form-columns {
        flex-direction: column !important;
    }

    .abfm-form-col-divider {
        border-left: none !important;
        border-right: none !important;
        border-top: 2px solid var(--color-border);
        border-bottom: 2px solid var(--color-border);
        padding: 10px !important;
    }

    .form-button {
        width: 100%;
    }
}
