﻿#history-dates, #history-files {
    /* width: 20%;*/
    padding: 0px 10px;
    border-left: 1px solid #ddd;
}

.history-date {
    display: flex;
    /*justify-content: space-between;*/
    align-items: center;
    background-color: #bef9ca70;
    padding: 5px;
    margin: 5px 0;
    gap: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.history-files {
    display: flex;
    align-items: center;
    /*background-color: #bef9ca70;*/
    padding: 5px;
    margin: 5px 0;
    gap: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.history-files-success {
    background-color: #bef9ca70;
    border-color: #26790085;
}
.history-files-warning {
    background-color: #fff99f70;
    border-color: #e8bd14ad;
}
.history-files-danger {
    background-color: #fd888870;
    border-color: #d9010180;
}

/* Stili per Approver */
#toggle-history {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    visibility: visible !important;
    opacity: 1 !important;
}

#toggle-history i {
    transition: transform 0.3s ease;
    font-size: 1rem;
}

#toggle-history:hover {
    opacity: 0.9;
}

/* Tabella per nuove richieste */
#permit-new-list-container {
    /*overflow-x: auto;*/
}

#permit-new-list-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#permit-new-list-container table th,
#permit-new-list-container table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #dee2e6;
}

#permit-new-list-container table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

#permit-new-list-container table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Distinzione tra approvate e non approvate nello storico */
.permit-approved {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

.permit-rejected {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
}

.permit-pending {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
}

.permit-closed {
    background-color: #e2e3e5 !important;
    border-color: #d6d8db !important;
    opacity: 0.7;
}

/* Stili per la tabella dello storico */
#permit-history-list-container {
    /*overflow-x: auto;*/
}

#permit-history-list-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#permit-history-list-container table th,
#permit-history-list-container table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid #dee2e6;
}

#permit-history-list-container table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

#permit-history-list-container table tbody tr:hover {
    opacity: 0.9;
}

#permit-history-list-container table tbody tr.permit-approved:hover {
    background-color: #c3e6cb !important;
}

#permit-history-list-container table tbody tr.permit-rejected:hover {
    background-color: #f5c6cb !important;
}

#permit-history-list-container table tbody tr.permit-pending:hover {
    background-color: #ffeaa7 !important;
}

#permit-history-list-container table tbody tr.permit-closed:hover {
    background-color: #d6d8db !important;
}

/* Stili per i pulsanti con icone */
.btn-permit, .btn-permit-receipts {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-permit i {
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.btn-permit:not(:disabled):hover i {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.btn-permit:disabled i {
    opacity: 0.5;
}

/* Icone specifiche con colori e animazioni */
.icon-accept {
    color: #198754;
    animation: pulse-accept 2s ease-in-out infinite;
}

.icon-accept-all {
    color: #198754;
    animation: pulse-accept 2s ease-in-out infinite;
}

.icon-reject {
    color: #dc3545;
    animation: pulse-reject 2s ease-in-out infinite;
}

.icon-reject-all {
    color: #dc3545;
    animation: pulse-reject 2s ease-in-out infinite;
}

.icon-details {
    color: #0dcaf0;
    animation: pulse-info 2s ease-in-out infinite;
}

@keyframes pulse-accept {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@keyframes pulse-reject {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

@keyframes pulse-info {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}

/* Effetti hover più accattivanti */
.btn-outline-success:hover .icon-accept,
.btn-outline-success:hover .icon-accept-all {
    color: #fff;
    transform: scale(1.3) rotate(10deg);
    text-shadow: 0 0 8px rgba(25, 135, 84, 0.5);
}

.btn-outline-danger:hover .icon-reject,
.btn-outline-danger:hover .icon-reject-all {
    color: #fff;
    transform: scale(1.3) rotate(-10deg);
    text-shadow: 0 0 8px rgba(220, 53, 69, 0.5);
}

.btn-outline-info:hover .icon-details {
    color: #fff;
    transform: scale(1.3);
    text-shadow: 0 0 8px rgba(13, 202, 240, 0.5);
}

/* Effetto ripple al click */
.btn-permit:not(:disabled)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-permit:not(:disabled):active::before {
    width: 300px;
    height: 300px;
}

/* Stili per il pulsante Dettagli e modal */
.btn-permit-details {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.min-height-textarea {
    min-height: 60px;
    word-wrap: break-word;
}

#detailsModal .modal-body label {
    margin-bottom: 0.5rem;
    display: block;
}

/* Stili per la pagina Cedolini */
.payslips-container {
    padding: 1.5rem;
    /*max-width: 1200px;*/
    margin: 0 auto;
}

.payslips-title {
    margin-bottom: 2rem;
    color: #333;
    font-weight: 600;
}

.payslips-title i {
    margin-right: 0.5rem;
    color: #0d6efd;
}

.payslips-content {
    margin-top: 2rem;
}

.payslips-year-section {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
}

.payslips-year-section:first-child {
    margin-top: 0;
}

.payslips-year-title {
    color: #495057;
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.payslips-item {
    margin-bottom: 0.7rem;
    padding: 0.7rem 1rem 0.7rem 1rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.payslips-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.payslips-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.payslips-item-name {
    flex: 1;
    font-size: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
}

.payslips-item-name.payslips-downloaded {
    color: #198754;
    font-weight: 500;
}

.payslips-check-icon {
    color: #198754;
    font-size: 1.1rem;
}

.payslips-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.payslips-download-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3);
}

.payslips-download-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.payslips-empty {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.payslips-empty h3 {
    color: #6c757d;
    font-weight: 400;
}

/* Responsive per schermi piccoli */
@media (max-width: 768px) {
    .payslips-container {
        padding: 1rem;
    }
    
    .payslips-item-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .payslips-download-btn {
        width: 100%;
        justify-content: center;
    }
    
    .payslips-item-name {
        width: 100%;
    }

}


.btn-reports {
    color: var(--bs-info-dark)
}

    .btn-reports :hover {
        color: var(--bs-info-dark);
        text-shadow: 0px 3px 8px var(--bs-info);
        cursor: pointer;
        transition: transform 0.2s ease, text-shadow 0.2s ease;
    }

