/* Modal Background */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    /* Slight blur for a modern effect */
}

/* Modal Content */
.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 15px;
    border-radius: 10px;
    width: 50%;
    max-height: 80vh;
    /* Prevents excessive height */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-in-out;
}

/* Sticky Header */
.modal-header {
    background-color: #004466;
    /* Modern deep blue */
    color: white;
    padding: 12px;
    font-size: 18px;
    font-weight: bold;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Modal Body with Scroll */
.modal-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    max-height: 60vh;
    /* Allows scrolling for large data */
}

/* Modal Table */
.modal-body table {
    width: 100%;
    border-collapse: collapse;
}

/* Modal Table Headers */
.modal-body td:first-child {
    font-weight: bold;
    background-color: #f8f9fa;
    width: 30%;
    /* Adjusted for compact layout */
    padding: 8px;
}

/* Modal Table Data */
.modal-body td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    word-wrap: break-word;
}

/* Sticky Footer */
.modal-footer {
    background-color: #f1f1f1;
    padding: 12px;
    text-align: right;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Close Button */
.close {
    color: #ff5757;
    float: right;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
    align-self: center;
}

.close:hover {
    opacity: 0.7;
}

/* Close Button in Footer */
.btn-close {
    background-color: #ff5757;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.btn-close:hover {
    background-color: #d9534f;
}

/* Export Button in Footer */
.btn-export {
    background-color: #4caf50;
    /* Green base color */
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-left: 10px;
    /* Optional spacing from the close button */
}

.btn-export:hover {
    background-color: #45a049;
    /* Darker green on hover */
}

.category-row{
    font-weight: bold;
    text-transform: uppercase;
    vertical-align: middle;
    text-align: center;
}
/* Carousel Image Styling */
.carousel-item {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 10px;
}

.carousel-item img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .carousel-item {
        height: 300px; /* Adjust for smaller screens */
    }
}
/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 80%;
        max-height: 90vh;
    }
}

@media print {

  /* Hide the original modal and buttons during print */
  #infoModal,
  .close,
  .btn-export,
  .btn-close {
    display: none !important;
  }

    /* Show the hidden print container */
    #printable-modal {
        display: block !important;
      }
}