.app-preview {
    width: 100% !important;
    justify-content: start !important;
    transition: box-shadow .2s ease, transform .2s ease;
}

    .app-preview:hover {
        transform: none;
    }

.app-preview-item {
    transition: transform .2s ease;
    word-break: break-word !important;
}
    .app-preview-item:hover {
    transform: scale(1.05) !important;
}


.apps-preview-grid {
    padding-top: 0.75rem;
    padding-bottom: 1.5rem;
    justify-content: center !important;
}

    .apps-preview-grid.justify-start {
        justify-content: center !important;
    }

.apps-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
}

.apps-subcategory {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1rem;
}
l
.apps-bento {
    border: solid;
    border-width: thin;
    border-color: var(--mud-palette-medium-gray-10O);
    color: white;
    background: white;
    box-shadow: none !important;
}

.apps-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.app-item:hover .apps-actions {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.app-item:not(:has(.apps-actions)):not(.apps-bento .app-item):not(.apps-subcategory .app-item) {
    padding-bottom: 2.25rem;
}

/* InitialsImage Component Styles */

.initials-avatar {
    border-radius: 50%;
    font-weight: 500;
    user-select: none;
}

/* Estilos para las iniciales (texto) */
.initials-avatar-text {
    background-color: #e9edf7;
    color: #5568a3;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Tamaņos del avatar */
.initials-avatar-small {
    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    min-width: 52px !important;
    font-size: 1rem;
}

.initials-avatar-medium {
    width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    min-width: 40px !important;
    font-size: 1rem;
}

.initials-avatar-large {
    width: 96px !important;
    height: 96px !important;
    min-height: 96px !important;
    min-width: 96px !important;
    font-size: 1.75rem;
}

.initials-avatar-xlarge {
    width: 135px !important;
    height: 135px !important;
    min-height: 135px !important;
    min-width: 135px !important;
    font-size: 3rem;
}


.apps-actions:hover {
    opacity: 1;
    pointer-events: auto;
    max-height: 3rem;
}

.apps-actions button {
    transition: all 0.2s ease;
}

    .apps-actions button:hover {
        transform: scale(1.1);
    }

.app-item {
    position: relative;
    width: 8rem;
    display: flex;
    flex-direction: column;
    justify-content: start;
    cursor: pointer;
    transition: transform .2s ease;
}

    .app-item:hover .app-preview {
        transform: scale(1.05);
    }

.create-app-circle {
    display: flex;
    justify-content: center;
    align-items: start;
    padding-top: 1.5rem !important;
}
/* Variantes de color para diferentes contextos */
.initials-avatar.primary {
    background-color: #e9edf7;
    color: #5568a3;
}

.initials-avatar.secondary {
    background-color: #f0f4f8;
    color: #64748b;
}

.app-item .app-preview {
    height: 100%;
}

.initials-avatar.success {
    background-color: #d1fae5;
    color: #065f46;
}

.initials-avatar.warning {
    background-color: #fed7aa;
    color: #92400e;
}

.app-preview .app-avatar,
.app-avatar,
.add-card .add-circle {
    transition: transform .2s ease;
    align-content: center;
}

.add-card {
    cursor: pointer;
    transition: transform .2s ease;
}

    .add-card:hover {
        transform: none;
    }

.add-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9edf7;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease;
}

.add-card:hover .add-circle {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.20);
}

.add-icon {
    color: #5568a3;
    font-size: 1.25rem;
}

.add-circle-preview {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.20);
}

.add-icon-preview {
    color: #5568a3;
    font-size: 1.25rem;
}

.initials-avatar.error {
    background-color: #fee2e2;
    color: #991b1b;
}

.app-preview .app-name,
.app-preview .app-favorite-icon {
    text-align: center;
    transform-origin: center;
}

.app-image-preview {
    flex-shrink: 0;
    border: 2px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.20);
}

/* Hover effect for upload button in modals */
.modal-upload-btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

    .modal-upload-btn:hover {
        transform: scale(1.05) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }

/* Spacing for delete image button in modals */
.GD-modal {
    width: 100%; /* deja que MaxWidth de MudBlazor controle */
}

.modal-create-app.mud-dialog {
    width: 50vw !important;
    max-width: 50vw !important;
    max-height: 85vh;
}

.modal-delete-image-btn {
    margin-left: 0.5rem !important;
}

.app-preview .app-avatar,
.app-avatar,
.app-image-preview-container {
    width: 64px !important;
    height: 64px !important;
    min-width: 52px !important;
    min-height: 52px !important;
    overflow: hidden;
}

.modal-create-app .mud-dialog-content {
    height: auto !important;
    max-height: 100%;
    overflow-y: auto;
}

.modal-create-app .GD-modal-body {
    max-height: none !important;
    overflow: visible !important;
}

.modal-create-app .create-app-modal-body {
    height: auto !important;
    max-height: none;
    overflow: visible;
    position: relative;
}

/* Keep Name and URL aligned on the same row; they only stack on very small screens */
.create-app-inputs-row {
    align-items: flex-start;
}

.app-image-fill,
.app-image-fill img,
.app-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

.old-apps-bento-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 3rem;
}


.apps-page-container {
    position: relative;
}

.apps-create-floating {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10;
}

    .apps-create-floating .add-card {
        padding: 0 !important;
    }

@media (min-width: 1400px) {
    .apps-create-floating {
        right: max(24px, calc((100vw - 100%) / 2 + 24px));
    }
}

@media (max-width: 960px) {
    .apps-create-floating {
        right: 16px;
        bottom: 16px;
    }
}
