.ucb-faculty-team-cards {
    width: 100%;
}

.ucb-faculty-team-cards__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 280px));
    gap: 40px 16px;
    align-items: stretch;
    justify-content: space-between;
}

.ucb-faculty-team-cards__item {
    width: 100%;
    max-width: 280px;
    min-width: 0;
}

.ucb-faculty-team-cards__item > .uc-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 409px !important;
    min-height: 409px;
    overflow: hidden;
}

.ucb-faculty-team-cards__image-link {
    display: block;
    flex: 0 0 260px;
    height: 260px;
    overflow: hidden;
}

.ucb-faculty-team-cards__image {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: top center;
}

.ucb-faculty-team-cards__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.ucb-faculty-team-cards__name {
    display: -webkit-box;
    margin-top: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ucb-faculty-team-cards__action {
    margin-top: auto !important;
}

.ucb-faculty-team-cards__grid.ucb-faculty-team-cards__grid--editor {
    grid-template-columns: repeat(4, 140px);
    gap: 16px;
    padding: 4px;
    overflow-x: auto;
    justify-content: start;
}

.ucb-faculty-team-cards__grid--editor .ucb-faculty-team-cards__item {
    position: relative;
    width: 140px;
    max-width: 140px;
    border-radius: 4px;
}

.ucb-faculty-team-cards__grid--editor .ucb-faculty-team-cards__item > .uc-card {
    height: 190px !important;
    min-height: 190px;
    border-radius: 4px;
}

.ucb-faculty-team-cards__grid--editor .ucb-faculty-team-cards__image-link {
    flex: 0 0 120px;
    height: 120px;
}

.ucb-faculty-team-cards__grid--editor .ucb-faculty-team-cards__body {
    padding: 9px 10px !important;
}

.ucb-faculty-team-cards__grid--editor .ucb-faculty-team-cards__name {
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
}

.ucb-faculty-team-cards__grid--editor .uc-text-divider,
.ucb-faculty-team-cards__grid--editor .ucb-faculty-team-cards__action {
    display: none;
}

.ucb-faculty-team-cards__editor-overlay {
    position: absolute;
    z-index: 3;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    background: rgba(255, 255, 255, 0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease;
}

.ucb-faculty-team-cards__move-title {
    color: #374151;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
}

.ucb-faculty-team-cards__move-controls {
    display: grid;
    grid-template-columns: repeat(3, 25px);
    grid-template-rows: repeat(3, 25px);
    gap: 1px;
}

.ucb-faculty-team-cards__move-controls .components-button.ucb-faculty-team-cards__move-button {
    justify-content: center;
    width: 25px;
    min-width: 25px;
    height: 25px;
    min-height: 25px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #374151 !important;
    box-shadow: none !important;
    font-family: sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    transition: background 100ms ease;
}

.ucb-faculty-team-cards__move-controls .components-button.ucb-faculty-team-cards__move-button:not(:disabled):hover,
.ucb-faculty-team-cards__move-controls .components-button.ucb-faculty-team-cards__move-button:not(:disabled):focus {
    background: transparent !important;
    color: #111827 !important;
}

.ucb-faculty-team-cards__move-controls .components-button.ucb-faculty-team-cards__move-button:focus {
    outline: 1px solid #6b7280;
    outline-offset: 1px;
}

.ucb-faculty-team-cards__move-controls .components-button.ucb-faculty-team-cards__move-button:disabled {
    background: transparent !important;
    color: #d1d5db !important;
    box-shadow: none;
}

.ucb-faculty-team-cards__move-up {
    grid-column: 2;
    grid-row: 1;
}

.ucb-faculty-team-cards__move-left {
    grid-column: 1;
    grid-row: 2;
}

.ucb-faculty-team-cards__move-right {
    grid-column: 3;
    grid-row: 2;
}

.ucb-faculty-team-cards__move-down {
    grid-column: 2;
    grid-row: 3;
}

.ucb-faculty-team-cards__editor-actions {
    display: flex;
    gap: 10px;
    padding-top: 2px;
}

.ucb-faculty-team-cards__editor-actions .components-button.ucb-faculty-team-cards__editor-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 22px;
    min-height: 22px;
    padding: 0 7px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 3px !important;
    background: #fff !important;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    box-shadow: none !important;
}

.ucb-faculty-team-cards__editor-actions .ucb-faculty-team-cards__editor-action--edit {
    color: #374151 !important;
}

.ucb-faculty-team-cards__editor-actions .ucb-faculty-team-cards__editor-action--edit:hover,
.ucb-faculty-team-cards__editor-actions .ucb-faculty-team-cards__editor-action--edit:focus {
    color: #111827 !important;
    background: #f3f4f6 !important;
}

.ucb-faculty-team-cards__editor-actions .ucb-faculty-team-cards__editor-action--delete {
    color: #b42318 !important;
}

.ucb-faculty-team-cards__editor-actions .ucb-faculty-team-cards__editor-action--delete:hover,
.ucb-faculty-team-cards__editor-actions .ucb-faculty-team-cards__editor-action--delete:focus {
    color: #7f1d1d !important;
    background: #fef2f2 !important;
}

.ucb-faculty-team-cards__item:hover .ucb-faculty-team-cards__editor-overlay,
.ucb-faculty-team-cards__item:focus-within .ucb-faculty-team-cards__editor-overlay {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 991.98px) {
    .ucb-faculty-team-cards__grid {
        grid-template-columns: repeat(2, minmax(0, 280px));
    }
}

@media (max-width: 599.98px) {
    .ucb-faculty-team-cards__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .ucb-faculty-team-cards__item {
        max-width: none;
    }

    .ucb-faculty-team-cards__item > .uc-card {
        height: auto !important;
        min-height: 409px;
    }

    .ucb-faculty-team-cards__image-link {
        aspect-ratio: 280 / 260;
        flex-basis: auto;
        height: auto;
    }
}
