/**
 * style.css - Foglio di stile personalizzato per il sistema di prenotazioni
 */

/* Stili generali */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f8fa;
}

.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header {
    border-radius: calc(0.5rem - 1px) calc(0.5rem - 1px) 0 0;
}

.btn {
    border-radius: 0.35rem;
}

/* Navbar */
.navbar-brand {
    font-weight: 500;
}

/* Dashboard */
.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.7;
}

/* Prenotazioni */
.booking-status-pending {
    border-left: 4px solid #ffc107;
}

.booking-status-completed {
    border-left: 4px solid #28a745;
}

.booking-status-cancelled {
    border-left: 4px solid #dc3545;
}

/* Lista d'attesa */
.waitlist-item-row {
    transition: background-color 0.2s;
}

.waitlist-item-row:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.waitlist-stats {
    margin-bottom: 1.5rem;
}

.waitlist-stat-card {
    transition: transform 0.2s;
    height: 100%;
}

.waitlist-stat-card:hover {
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    padding: 0.25em 0.6em;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
}

.available-slot-badge {
    background-color: #d4edda;
    color: #155724;
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    border: 1px solid #c3e6cb;
}

.available-slot-select {
    min-width: 100px;
}

.priority-high {
    border-left: 4px solid #dc3545;
}

.priority-medium {
    border-left: 4px solid #ffc107;
}

.priority-low {
    border-left: 4px solid #28a745;
}

/* Form */
.form-label {
    font-weight: 500;
}

.form-check-label {
    font-weight: normal;
}

/* Tabelle */
.table th {
    font-weight: 600;
    border-top: none;
}

.table td {
    vertical-align: middle;
}

/* Footer */
.footer {
    margin-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 767.98px) {
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Modal */
.modal-header {
    background-color: #f5f8fa;
}

/* Animazioni */
.fade-in {
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tooltips */
.tooltip {
    font-size: 0.8rem;
}

/* Alerts */
.alert {
    border-radius: 0.35rem;
}

/* Success/Error Status Colors */
.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #17a2b8 !important;
}

/* Placeholder per immagini */
.img-placeholder {
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    color: #6c757d;
    border-radius: 0.35rem;
}

/* Loader */
.loader {
    border: 3px solid #f3f3f3;
    border-radius: 50%;
    border-top: 3px solid #3498db;
    width: 20px;
    height: 20px;
    -webkit-animation: spin 1s linear infinite;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

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

/* Stile per avatar circolari */
.avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

/* Stili per badge e etichette */
.badge {
    font-weight: 400;
    padding: 0.4em 0.6em;
}

/* Stile per liste di transazioni */
.transaction-list .list-group-item {
    padding: 1rem;
    border-left: 0;
    border-right: 0;
}

.transaction-list .transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

/* Hover effetti per pulsanti azioni */
.btn-action {
    transition: all 0.2s;
}

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

/* Stile per carte di stato */
.status-card {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.status-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Stile per progress bar affidabilità */
.reliability-progress {
    height: 10px;
    border-radius: 5px;
}

/* Custom tooltip */
.custom-tooltip {
    position: relative;
    display: inline-block;
}

.custom-tooltip .tooltip-text {
    visibility: hidden;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    width: 160px;
    font-size: 0.8rem;
}

.custom-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Stili per la pagina wallet */
.wallet-balance {
    font-size: 2.5rem;
    font-weight: 700;
}

.wallet-transaction {
    border-left: 4px solid transparent;
    transition: all 0.2s;
}

.wallet-transaction:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.wallet-transaction.deposit {
    border-left-color: #28a745;
}

.wallet-transaction.withdrawal {
    border-left-color: #dc3545;
}

.wallet-transaction.payment {
    border-left-color: #007bff;
}

.wallet-transaction.refund {
    border-left-color: #ffc107;
}

/* Stili per la blacklist */
.blacklisted-customer {
    background-color: rgba(220, 53, 69, 0.05);
}

.blacklisted-customer td {
    position: relative;
}

.blacklisted-customer td:first-child:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #dc3545;
}

/* Stile per i messaggi di errore del datepicker */
input[type="date"]:invalid {
    border-color: #dc3545;
}

input[type="date"]:invalid + small {
    color: #dc3545;
}

/* Mostra il messaggio di errore personalizzato */
input[type="date"]:invalid::after {
    content: attr(data-error);
    color: #dc3545;
    font-size: 0.875rem;
    display: block;
    margin-top: 0.25rem;
}

/* Aggiungi al tuo CSS */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}


/* Stili per l'indicatore di forza della password */
.password-strength {
    margin-top: 5px;
    height: 5px;
    width: 100%;
    background-color: #e9ecef;
    border-radius: 3px;
    position: relative;
}

.password-strength.weak::before {
    content: "";
    width: 25%;
    height: 100%;
    background-color: #dc3545;
    position: absolute;
    border-radius: 3px;
}

.password-strength.medium::before {
    content: "";
    width: 50%;
    height: 100%;
    background-color: #ffc107;
    position: absolute;
    border-radius: 3px;
}

.password-strength.strong::before {
    content: "";
    width: 75%;
    height: 100%;
    background-color: #28a745;
    position: absolute;
    border-radius: 3px;
}

.password-strength.very-strong::before {
    content: "";
    width: 100%;
    height: 100%;
    background-color: #198754;
    position: absolute;
    border-radius: 3px;
}

.password-strength::after {
    content: attr(text);
    position: absolute;
    right: 0;
    font-size: 0.75rem;
    color: #6c757d;
    top: -18px;
}


/* Stili per l'esportazione PDF */
@media print {
    body {
        font-family: Arial, sans-serif;
        color: #333;
    }
    
    .no-print {
        display: none !important;
    }
    
    /* Assicura che i grafici vengano visualizzati correttamente nei PDF */
    canvas {
        max-width: 100%;
        height: auto !important;
    }
    
    /* Migliora l'aspetto delle tabelle nei PDF */
    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 20px;
    }
    
    th, td {
        padding: 8px;
        border: 1px solid #ddd;
    }
    
    th {
        background-color: #f5f5f5;
    }
    
    /* Assicura che le card abbiano un aspetto coerente */
    .card {
        page-break-inside: avoid;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 4px;
    }
    
    .card-header {
        background-color: #f5f5f5;
        padding: 10px 15px;
        border-bottom: 1px solid #ddd;
    }
    
    .card-body {
        padding: 15px;
    }
}