/* Small custom styles for Formazione app */
body {
    background: #f8f9fa;
}

.app-card {
    background: #ffffff;
    border: 1px solid #e3e6ea;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 6px 18px rgba(31, 41, 55, 0.06);
}

.form-label {
    font-weight: 600;
}

.mt-1 {
    margin-top: .25rem;
}

.mt-2 {
    margin-top: .5rem;
}

.mb-2 {
    margin-bottom: .5rem;
}

/* Header tweaks */
.navbar-brand {
    font-weight: 700;
    color: #0d6efd;
}

.navbar {
    min-height: 56px;
}

/* Footer */
footer.app-footer {
    padding: 18px 0;
    background: transparent;
    color: #6c757d;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive form tweaks */
@media (min-width: 768px) {
    .app-card {
        padding: 32px;
    }
}

/* Utility */
.hidden {
    display: none !important;
}

.year-select {
    width: auto;
    display: inline-block;
}

.ore-formazione {
    background-color: green;
    border-radius: 50%;
    padding: 5px;
}

.ore-formazione-yellow {
    background-color: yellow;
    border-radius: 50%;
    padding: 5px;
}

.table-container {
    max-height: calc(100vh - 200px);
    /* Altezza massima: altezza schermo meno spazio per header/padding */
    overflow-y: auto;
}

/* Opzionale: mantieni l'header della tabella fisso durante lo scroll */
.table-fixed-header thead th {
    position: sticky;
    top: 0;
    background-color: var(--bs-table-bg);
    z-index: 10;
}

/* Per tabelle con strisce, mantieni il colore di sfondo dell'header */
.table-striped .table-fixed-header thead th {
    background-color: var(--bs-body-bg);
}

/* Stili per la modale di dettaglio */
#employee-details-modal .modal-body iframe {
    width: 100%;
    height: 70vh;
    border: none;
}

.sortable-header {
    cursor: pointer;
}

.sortable-header::after {
    content: '\2195'; /* Up-down arrow */
    color: #ccc;
    margin-left: 5px;
}

.sortable-header.sort-asc::after {
    content: '\25B2'; /* Up arrow */
    color: #333;
}

.sortable-header.sort-desc::after {
    content: '\25BC'; /* Down arrow */
    color: #333;
}

/* === Dashboard v2 Styles === */
.app-card .display-5 {
    font-size: 2.5rem; /* Riduci leggermente la dimensione per un look più pulito */
}

.app-card .fs-1 {
    font-size: 3rem !important;
    opacity: 0.2;
}

.progress, .progress-bar {
    border-radius: 10px;
}

.badge.bg-info-subtle {
    font-weight: 500;
}

details > summary {
    cursor: pointer;
    list-style: none; /* Rimuovi la freccia di default */
}

details > summary::-webkit-details-marker {
    display: none; /* Rimuovi la freccia di default in Chrome */
}

details > summary::before {
    content: '\F282'; /* Icona bootstrap per freccia a destra */
    font-family: 'bootstrap-icons';
    margin-right: 0.5rem;
    display: inline-block;
    transition: transform 0.2s;
}

details[open] > summary::before {
    transform: rotate(90deg);
}

.user-search-results {
    max-height: 200px;
    overflow-y: auto;
}

/* 2FA Input Style */
.otp-input {
    letter-spacing: 0.5em;
    font-size: 1.5em;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.9);
    color: #0d6efd;
    padding: 10px 15px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border: 1px solid #e3e6ea;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.scroll-indicator.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateX(-50%) translateY(0);}
    40% {transform: translateX(-50%) translateY(-10px);}
    60% {transform: translateX(-50%) translateY(-5px);}
}
/* Row highlight animation */
@keyframes highlightFade {
    0% { box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.4); }
    100% { box-shadow: inset 0 0 0 9999px transparent; }
}
.flash-row > * {
    animation: highlightFade 3s ease-out forwards;
}

/* Table action icons tweaks */
.action-link {
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    padding: 4px;
    border-radius: 4px;
    outline: none;
}

.action-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.2);
}

/* Specific colors for hover if not using standard link-classes */
.action-link.link-primary:hover { color: #0a58ca !important; }
.action-link.link-success:hover { color: #146c43 !important; }
.action-link.link-danger:hover { color: #b02a37 !important; }
.action-link.link-secondary:hover { color: #565e64 !important; }
.action-link.link-info:hover { color: #087990 !important; }

/* Remove any potential focus ring or shadow that could look like a dash */
.action-link:focus {
    box-shadow: none;
}

/* Ensure icons inside links inherit colors correctly */
.action-link i {
    vertical-align: middle;
    line-height: 1;
}

.w-title {
    min-width: 250px;
}