/**
 * AvatarManager Styles - Premium, less-opaque feel
 */

.avatar-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    /* Slightly darker for focus */
    backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    /* Above almost everything */
    animation: avatarFadeIn 0.3s ease;
}

.avatar-modal-content {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 480px;
    max-width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.avatar-modal-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.avatar-close-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.avatar-close-btn:hover {
    color: #fff;
}

.avatar-modal-body {
    padding: 0;
    background: #000;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* Prevent overflow issues */
}

.avatar-crop-container {
    width: 100%;
    height: 100%;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#avatarCropImg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* Cropper Customizations */
.avatar-crop-container .cropper-view-box,
.avatar-crop-container .cropper-face {
    border-radius: 50% !important;
}

.cropper-view-box {
    outline: none !important;
    border: 2px solid #fff !important;
    box-shadow: 0 0 0 100vw rgba(0, 0, 0, 0.1);
}

.avatar-modal-controls {
    padding: 16px 24px;
    background: #111;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.control-group {
    display: flex;
    gap: 4px;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.ctrl-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.btn-change-source {
    width: auto;
    padding: 0 16px;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 8px;
}

.pro-upsell-lite {
    padding: 12px 24px;
    background: linear-gradient(90deg, #1e1b4b 0%, #111 80%);
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

.pro-upsell-lite i {
    color: #fdc62e;
}

.pro-upsell-lite a {
    color: #8b5cf6;
    text-decoration: none;
    font-weight: 700;
    margin-left: auto;
}

.avatar-modal-footer {
    padding: 24px;
    background: #111;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.avatar-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #eee;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.avatar-btn-save {
    background: linear-gradient(135deg, #fff 0%, #e4e4e7 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #000;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.avatar-btn-save:hover {
    background: #fff;
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    filter: brightness(1.1);
}

@keyframes avatarFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}