/* BIP Change Log Styles */
.bip-change-log-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
}

.bip-change-log-link {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s;
}

.bip-change-log-link:hover {
    background: #005a87;
    color: #fff;
}

.bip-icon {
    margin-right: 5px;
}

/* Modal */
.bip-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.bip-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.bip-modal-content h2 {
    margin: 0;
    padding: 20px;
    background: #0073aa;
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.bip-modal-close {
    color: #fff;
    float: right;
    font-size: 30px;
    font-weight: 500;
    line-height: 20px;
    cursor: pointer;
    margin-top: 10px;
    margin-right: 10px;
}

.bip-modal-close:hover,
.bip-modal-close:focus {
    opacity: 0.8;
}

.bip-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Table */
.bip-changes-table-wrapper {
    overflow-x: auto;
}

.bip-changes-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.bip-changes-table th,
.bip-changes-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bip-changes-table th {
    background-color: #f1f1f1;
    font-weight: 600;
    color: #333;
}

.bip-changes-table tr:hover {
    background-color: #f5f5f5;
}

.bip-changes-table td:first-child {
    font-weight: 500;
    color: #666;
}

.bip-preview-revision {
    display: inline-block;
    padding: 5px 12px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    transition: background 0.3s;
}

.bip-preview-revision:hover {
    background: #005a87;
}

.bip-no-preview {
    color: #999;
}

.bip-no-changes {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Revision Preview */
.bip-revision-preview {
    padding: 20px;
}

.bip-revision-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.bip-revision-header h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.bip-revision-meta {
    color: #666;
    font-size: 12px;
    margin: 5px 0;
}

.bip-revision-content {
    line-height: 1.8;
}

/* Responsive */ 
@media screen and (max-width: 768px) {
    .bip-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .bip-changes-table {
        font-size: 12px;
    }
    
    .bip-changes-table th,
    .bip-changes-table td {
        padding: 8px;
    }
}
/* Style dla drukowania - ukrywa niepotrzebne elementy */
@media print {
    /* Ukryj wszystko oprócz głównej zawartości */
    body > *:not(#page-content-wrapper) {
        display: none !important;
    }
    
    /* Ukryj elementy nawigacji i boczne panele */
    #sidebar,
    .sidebar,
    nav,
    header,
    footer,
    .menu,
    .navigation,
    .bip-print-hidden {
        display: none !important;
    }
    
    /* Pokaż tylko zawartość główną */
    #page-content-wrapper {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
    }
    
    /* Usuń cienie i obramowania */
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Czarno-biały druk dla lepszej czytelności */
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    /* Ukryj modalne okna przy drukowaniu */
    .bip-modal {
        display: none !important;
    }
    
    /* Ukryj przyciski akcji przy drukowaniu */
    .bip-action-buttons {
        display: none !important;
    }
    
    /* Zachowaj tabele w czytelnej formie */
    table {
        border-collapse: collapse !important;
    }
    
    table td,
    table th {
        border: 1px solid #000 !important;
        padding: 8px !important;
    }
    
    /* Dodaj podziały stron dla dłuższych treści */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    img {
        page-break-inside: avoid;
    }
}

/* Style dla klasy tymczasowej dodawanej przez JavaScript */
.bip-print-hidden {
    display: none !important;
}
/* BIP Change Log Styles */
.bip-change-log-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #0073aa;
}

.bip-change-log-link {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s;
}

.bip-change-log-link:hover {
    background: #005a87;
    color: #fff;
}

.bip-icon {
    margin-right: 5px;
}

/* Modal */
.bip-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.bip-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.bip-modal-content h2 {
    margin: 0;
    padding: 20px;
    background: #0073aa;
    color: #fff;
    border-radius: 8px 8px 0 0;
}

.bip-modal-close {
    color: #fff;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
}

.bip-modal-close:hover,
.bip-modal-close:focus {
    opacity: 0.8;
}

.bip-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Table */
.bip-changes-table-wrapper {
    overflow-x: auto;
}

.bip-changes-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.bip-changes-table th,
.bip-changes-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.bip-changes-table th {
    background-color: #f1f1f1;
    font-weight: 600;
    color: #333;
}

.bip-changes-table tr:hover {
    background-color: #f5f5f5;
}

.bip-changes-table td:first-child {
    font-weight: 500;
    color: #666;
}

.bip-preview-revision {
    display: inline-block;
    padding: 5px 12px;
    background: #0073aa;
    color: #fff !important;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: background 0.3s;
}

.bip-preview-revision:hover {
    background: #005a87;
}

.bip-no-preview {
    color: #999;
}

.bip-no-changes {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Revision Preview */
.bip-revision-preview {
    padding: 20px;
}

.bip-revision-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.bip-revision-header h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.bip-revision-meta {
    color: #666;
    font-size: 14px;
    margin: 5px 0;
}

.bip-revision-content {
    line-height: 1.8;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .bip-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .bip-changes-table {
        font-size: 14px;
    }
    
    .bip-changes-table th,
    .bip-changes-table td {
        padding: 8px;
    }
}

/* Style dla przycisku drukowania */
.bip-print-button {
    cursor: pointer;
    transition: background 0.3s;
}

.bip-print-button:hover {
    background: #e0e0e0 !important;
}
