#szczegoly-loader-overlay {
    visibility: hidden;
    position: absolute;
    top: 5px;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    z-index: 999999;
    justify-content: center;
    
}

.szczegoly-loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #ED1C24;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

#szczegoly-loader-overlay.active {
    visibility: visible;
    overflow: hidden;
}
  
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.content-area{
    border-right-width: 0 !important;
}

.popup {
    width: 95%;
    max-width: 1100px;
    max-height: 90vh;
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #fff;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    z-index: 1001;
    overflow: hidden;
}

.popup.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.overlay.show {
    display: block;
    opacity: 1;
}

#overlay_edycja_szczegolow {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

#overlay_edycja_szczegolow.show {
    display: block;
    opacity: 1;
}

#popup_edycja_szczegolow #form_edycja_szczegolow .zam_btn-light {
    display: block;
    margin: 10px auto 0 auto;
}

#popup_edycja_szczegolow{
    overflow: auto;
}

form input[type=number] {
    max-width: 100% !important;
}

.label-optional {
    color: #999;
    font-size: 12px;
    font-style: italic;
    margin-left: 5px;
}

.label-required {
    color: #e74c3c;
    font-size: 12px;
    font-style: italic;
    margin-left: 5px;
}


.close {
    cursor: pointer;
    position: absolute;
    top: 20px; right: 20px;
    font-size: 28px;
    color: #333;
    transition: color 0.2s;
}

.close:hover {
    color: #e74c3c;
}

#popup-content h3 {
    font-size: 28px;
    margin-bottom: 25px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
}

#popup-scrollable {
    overflow-y: auto;
    max-height: 60vh;
    padding-right: 10px;
}

#popup-text {
    display: flex;
    gap: 16px 30px;
    font-size: 16px;
    color: #444;
    flex-direction: row;
    flex-wrap: wrap;
}

#popup-text div {
    width: 48%;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

#popup-text strong {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
}

.additionalInfo strong{
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
}

#popup-img {
    margin-top: 30px;
}

#popup-img h4 {
    margin-bottom: 10px;
    font-size: 20px;
    color: #2c3e50;
}

@media (max-width: 768px) {
    .popup {
        padding: 25px;
    }

    #popup-text {
        grid-template-columns: 1fr;
    }

    #popup-content h3 {
        font-size: 24px;
    }
}

.szczegoly-container {
    max-width: 1000px;
    margin: 0 auto;
}

.szczegoly-header {
    display: flex;
    align-items: center;
    gap: 10px;
}


.szczegoly-title {
    margin: 0;
}

.szczegoly-opis {
    margin: 10px 0 20px;
    color: #444;
}

.szcz_btn {
    padding: 10px 18px;
    margin-right: 10px;
    border: 1px solid #ccc;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease, border-color 0.3s ease;
}

.szcz_btn:hover {
    background: #eaeaea;
    border-color: #999;
}

.szczegoly-tabela {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

th, td {
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
    text-align: center !important;
    vertical-align: middle !important;
}

th {
    background: #f1f1f1;
    font-weight: bold;
}

.szczegoly-akcje button {
    margin: 4px 2px;
    padding: 6px 10px;
    font-size: 90%;
    border-radius: 4px;
    border: none;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-primary {
    background: #007bff;
}
.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
}
.btn-secondary:hover {
    background: #545b62;
}

.btn-secondary a {
    text-decoration: none !important;
    color: white !important;
    font-weight: bold !important;
}

.btn-secondary a:hover {
    color: white !important;
}

.btn-info {
    background: #17a2b8;
}
.btn-info:hover {
    background: #117a8b;
}

.btn-danger {
    background: #dc3545;
}
.btn-danger:hover {
    background: #b52a37;
}

.szczegoly-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
}

.szczegoly-card:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.szczegoly-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.szczegoly-back {
    font-size: 220%;
    text-decoration: none !important;
    color: #ED1C24 !important;
    transition: color 0.3s ease !important;
}

.szczegoly-back:hover {
    color: #c01016 !important;
}

.szczegoly-title {
    font-weight: 700;
    margin: 0;
    color: #222;
}

.szczegoly-opis {
    color: #444;
    margin-bottom: 20px;
}

.szczegoly-buttons {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 12px;
}

.zam_btn-light {
    padding: 10px 18px;
    border: 1px solid #d1d5db;
    background: linear-gradient(to right, #f9fafb, #f3f4f6);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.zam_btn-light:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}
  
.wyc_empty-message {
    background: white;
    padding: 20px;
    border-radius: 8px;
    font-size: 150%;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-top: 20px;
  }
  
#wycenyTable_length label{
    display: flex;
    align-items: center;
  }
  
#wycenyTable_length, #wycenyTable_filter{
    padding: 5px;
}

#wycenyTable_info{
    margin-left: 5px;
}

@media (max-width: 768px) {
    th, td {
        padding: 8px 12px;
    }

    .szcz_btn {
        width: 100%;
    }

    .szczegoly-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .zam_btn-light {
        width: 100%;
        text-align: center !important;
    }
}