/**
 * Stili per la modifica in-place della pagina pubblica dell'azienda
 * Stile Google My Business
 */

/* Contenitore editabile */
.editable-section {
    position: relative;
}

/* Pulsante di modifica */
.edit-button {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
    color: #527cb5;
}

.editable-section:hover .edit-button {
    opacity: 1;
    transform: translateY(0);
}

.edit-button:hover {
    background-color: #f8f9fa;
    transform: scale(1.1);
}

.edit-button i {
    font-size: 16px;
}

/* Pulsante di modifica piccolo per elementi interni */
.edit-button-small {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 10;
    color: #527cb5;
}

.contact-item {
    position: relative;
}

.contact-item:hover .edit-button-small {
    opacity: 1;
    transform: translateY(0);
}

.edit-button-small:hover {
    background-color: #f8f9fa;
    transform: scale(1.1);
}

.edit-button-small i {
    font-size: 12px;
}

/* Form di modifica */
.edit-form {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.edit-form .form-group {
    margin-bottom: 15px;
}

.edit-form .form-label {
    font-weight: 600;
    color: #527cb5;
    margin-bottom: 5px;
}

.edit-form .form-control {
    border-color: #e0e0e0;
}

.edit-form .form-control:focus {
    border-color: #527cb5;
    box-shadow: 0 0 0 0.2rem rgba(90, 126, 187, 0.25);
}

.edit-form .btn-primary {
    background-color: #527cb5;
    border-color: #527cb5;
}

.edit-form .btn-primary:hover {
    background-color: #4A6BA8;
    border-color: #4A6BA8;
}

.edit-form .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.edit-form .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #fff;
}

/* Indicatore di caricamento */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    color: #527cb5;
}

.loading-indicator i {
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifiche */
#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    animation: slide-in 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-icon {
    margin-right: 15px;
    font-size: 20px;
}

.notification-success .notification-icon {
    color: #28a745;
}

.notification-error .notification-icon {
    color: #dc3545;
}

.notification-content {
    flex: 1;
}

.notification-content p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.notification-close {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: #666;
}

.notification-closing {
    opacity: 0;
    transform: translateX(30px);
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stili per l'upload di immagini */
.media-upload-container {
    position: relative;
    cursor: pointer;
}

.media-upload-container:hover .media-upload-overlay {
    opacity: 1;
}

.media-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.media-upload-overlay i {
    color: #fff;
    font-size: 24px;
}

.media-upload-input {
    display: none;
}

/* Stili per le sezioni vuote */
.empty-section {
    padding: 30px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    border: 2px dashed #dee2e6;
}

.empty-section-icon {
    font-size: 48px;
    color: #adb5bd;
    margin-bottom: 15px;
}

.empty-section-text {
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-section-button {
    background-color: #527cb5;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.empty-section-button:hover {
    background-color: #4A6BA8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 126, 187, 0.3);
}

/* Stili per i modali */
.modal-header {
    background-color: #527cb5;
    color: #fff;
}

.modal-title {
    font-weight: 600;
}

.btn-close {
    color: #fff;
    opacity: 0.8;
}

.btn-close:hover {
    opacity: 1;
}

/* Stili per le card di elementi (dipendenti, progetti, post) */
.element-card {
    position: relative;
    transition: all 0.3s ease;
}

.element-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.element-card .element-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.element-card:hover .element-actions {
    opacity: 1;
}

.element-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    color: #527cb5;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.element-action-btn:hover {
    transform: scale(1.1);
}

.element-action-btn.edit-btn:hover {
    background-color: #527cb5;
    color: #fff;
}

.element-action-btn.delete-btn:hover {
    background-color: #dc3545;
    color: #fff;
}

/* Stili per gli elementi inattivi */
.inactive-element {
    opacity: 0.6;
    position: relative;
}

.inactive-element::after {
    content: 'Non pubblicato';
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #dc3545;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Stili per il pulsante di aggiunta */
.add-element-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #527cb5;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.add-element-btn:hover {
    background-color: #4A6BA8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(90, 126, 187, 0.3);
}

.add-element-btn i {
    font-size: 16px;
}
