/* ========== Employee Menu ========== */

.employee-menu-activator {
    cursor: pointer;
}

.employee-menu-fullname {
    color: #fff !important;
}

.employee-menu-rol {
    color: #fff !important;
}

.employee-menu-arrow {
    color: #fff !important;
    transition: transform 0.18s cubic-bezier(.4, 0, .2, 1);
}

.employee-menu-arrow.arrow-open {
    transform: rotate(180deg);
}

/* ========== Employee Profile Modal ========== */

.modal-employee-profile.GD-modal {
    width: min(36rem, 94vw) !important;
    max-width: 36rem !important;
    max-height: 88vh !important;
}

/* Single scroll owner: let the modal body scroll, not the MudBlazor content wrapper */
.modal-employee-profile .mud-dialog-content {
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

.modal-employee-profile.GD-modal .GD-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* --- Header row: avatar + identity side by side --- */

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 0;
}

/* --- Avatar field (upload / preview / crop) --- */

.profile-avatar-field {
    display: flex;
    flex-direction: column;
}

.profile-avatar-upload-box {
    aspect-ratio: 1 / 1;
    width: 12rem;
    max-width: 12rem;
    max-height: 12rem;
    border-radius: 50% !important;
    padding: 1rem;
}

.profile-avatar-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    text-align: center;
}

.profile-avatar-upload-icon {
    color: var(--mud-palette-secondary-blue) !important;
    font-size: 2.25rem !important;
}

/* Avatar cropper inside the profile modal: center content and trim empty gray space */
.modal-employee-profile .avatar-cropper {
    gap: 0.5rem;
    align-items: center;
}

.modal-employee-profile .avatar-cropper-host {
    justify-content: center;
    align-items: center;
    min-height: unset;
    width: auto;
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem 1.25rem;
}

.modal-employee-profile .avatar-cropper .croppie-container {
    max-width: 100%;
    width: auto;
}

.modal-employee-profile .avatar-cropper-help {
    text-align: center;
}

/* --- Avatar section --- */

.profile-avatar-wrapper {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.profile-avatar-wrapper .mud-avatar {
    width: 4.5rem !important;
    height: 4.5rem !important;
    font-size: 1.75rem !important;
    border: 2.5px solid var(--mud-palette-secondary-blue-10O);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.profile-avatar-wrapper:hover .mud-avatar {
    border-color: var(--mud-palette-secondary-blue);
    box-shadow: 0 0 0 4px var(--mud-palette-secondary-blue-10O);
    transform: scale(1.06);
}

.profile-avatar-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(0, 0, 48, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.profile-avatar-wrapper:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-avatar-overlay .mud-icon-root {
    color: #fff !important;
    font-size: 1.35rem !important;
}

.profile-avatar-disabled {
    opacity: 0.6;
    pointer-events: none;
}

.profile-avatar-loading-overlay {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* --- Header identity (right of avatar) --- */

.profile-header-identity {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

/* --- Change avatar button --- */

.profile-change-avatar-btn {
    text-transform: none !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    color: var(--mud-palette-secondary-blue) !important;
    padding: 0.1rem 0.4rem !important;
    min-height: unset !important;
    height: auto !important;
    border-radius: 1rem !important;
    transition: background 0.2s ease;
    align-self: flex-start;
    margin-top: 0.15rem;
}

.profile-change-avatar-btn:hover {
    background: var(--mud-palette-secondary-blue-10O) !important;
}

/* --- Section divider --- */

.profile-section-divider {
    margin: 0.5rem 0 0.75rem 0 !important;
}

/* --- Read-only info field --- */

.profile-info-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem 0;
}

.profile-info-field .mud-typography-caption {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.profile-info-icon {
    font-size: 0.875rem !important;
    vertical-align: middle;
}

/* --- Editable field display (non-editing state) --- */

.profile-editable-display {
    flex: 1 1 auto;
    min-height: 2.25rem;
    display: flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 0.25rem;
    background: var(--mud-palette-surface);
    transition: border-color 0.2s ease;
}

.profile-editable-display:hover {
    border-color: var(--mud-palette-secondary-blue-60O);
}

/* --- Alert area --- */

.profile-alert-area {
    margin-top: 0.75rem;
}

.profile-alert-area .mud-alert {
    border-radius: 0.5rem !important;
}

.profile-alert-area .mud-alert .mud-alert-close button {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.profile-alert-area .mud-alert .mud-alert-close .mud-icon-root {
    color: #9e9e9e !important;
    fill: #9e9e9e !important;
}

.profile-alert-area .mud-alert .mud-alert-close .mud-icon-root:hover {
    transform: scale(1.08);
}
