/* Profile Image Cropper Styles */

.profile-cropper-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.profile-cropper-image-container {
    width: 100%;
    min-height: 300px;
    max-height: 400px;
    overflow: hidden;
    background-color: #333;
    border-radius: 8px;
}

.profile-cropper-image-container img {
    display: block;
    max-width: 100%;
}

/* Cropper.js overrides for circular preview */
.cropper-view-box,
.cropper-face {
    border-radius: 50%;
}

.cropper-view-box {
    box-shadow: 0 0 0 1px #39f;
    outline: 0;
}

.cropper-face {
    background-color: transparent !important;
}

/* Controls container */
.profile-cropper-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
    background-color: #fafafa;
    border-radius: 0 0 8px 8px;
    justify-content: center;
}

.profile-cropper-controls .control-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.profile-cropper-controls .control-label {
    font-size: 0.75rem;
    color: #666;
    margin-right: 4px;
    min-width: 50px;
}

/* Preview container */
.profile-cropper-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px;
    gap: 8px;
}

.profile-cropper-preview-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--mud-palette-primary, #1976d2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    background-color: #f0f0f0;
}

.profile-cropper-preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-cropper-preview-label {
    font-size: 0.875rem;
    color: #666;
}

/* Loading overlay */
.profile-cropper-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

/* Instructions */
.profile-cropper-instructions {
    padding: 12px 16px;
    background-color: #e3f2fd;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    color: #1565c0;
}

.profile-cropper-instructions ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.profile-cropper-instructions li {
    margin-bottom: 4px;
}

/* Icon buttons styling */
.profile-cropper-controls .mud-icon-button {
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.profile-cropper-controls .mud-icon-button:hover {
    background-color: #e3f2fd;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .profile-cropper-image-container {
        min-height: 250px;
        max-height: 300px;
    }
    
    .profile-cropper-controls {
        padding: 12px;
        gap: 6px;
    }
    
    .profile-cropper-preview-circle {
        width: 100px;
        height: 100px;
    }
}

/* Dialog specific styles */
.profile-picture-dialog .mud-dialog-content {
    padding: 16px;
}

.profile-picture-dialog .mud-dialog-actions {
    padding: 12px 16px;
}

/* Ensure proper z-index for MudBlazor dialog */
.profile-picture-dialog {
    z-index: 2000;
}

/* Step indicator */
.profile-cropper-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
    gap: 8px;
}

.profile-cropper-step {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    color: #999;
}

.profile-cropper-step.active {
    color: var(--mud-palette-primary, #1976d2);
    font-weight: 500;
}

.profile-cropper-step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.profile-cropper-step.active .profile-cropper-step-number {
    background-color: var(--mud-palette-primary, #1976d2);
    color: white;
}

.profile-cropper-step.completed .profile-cropper-step-number {
    background-color: var(--mud-palette-success, #4caf50);
    color: white;
}
