.wp-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    z-index: 9999;
    background: #00000050;
    color: #fff;
    overflow-y: auto; /* Allow scrolling within the popup */
    animation: fadeIn 0.5s;
}

.wp-popup-content {
    position: relative;
    padding: 20px;
    background: #2e2139;
    border-radius: 8px;
    width: 50%;
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.wp-popup-content-header {
    position: sticky;
    top: 0;
    background: #2e2139;
    z-index: 1;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.wp-popup-content-header h2 {
    font-size: 24px;
    margin: 0;
}

.wp-popup-content-body {
    overflow-y: auto;
    padding-top: 15px;
    flex-grow: 1;
}

.wp-popup-content > * {
    max-width: 100%;
}

/* Full-Screen Popup with Header Overlap */
.wp-popup.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #00000050;
    z-index: 99999; /* Ensure it's on top of everything */
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

.wp-popup-content.fullscreen-content {
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    padding: 40px;
    border-radius: 10px;
    position: relative;
    z-index: 100000; /* Popup content to be on top */
    display: flex;
    flex-direction: column;
}

.wp-popup-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Close Button Styling */
.wp-popup-close {
    align-self: flex-end;
    font-size: 30px;
    cursor: pointer;
    color: #fff;
    z-index: 100001; /* Ensure the close button is visible */
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    margin-bottom: 10px; /* Add some space below the button */
}

.wp-popup-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Adjust for fullscreen popups */
.wp-popup.fullscreen .wp-popup-content {
    max-width: 90%;
    max-height: 90vh;
    background: #2e2139;
}

.wp-popup.fullscreen .wp-popup-close {
    color: rgba(255, 255, 255, 0.8);
}

.wp-popup.fullscreen .wp-popup-close:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Fade-in effect for the popup */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Fade-out effect */
.wp-popup.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(100%);
    }
}

/* Ensure the popup stays hidden after fade-out */
.wp-popup.hidden {
    display: none;
}

/* Popup trigger hover effect */
.wp-popup-trigger {
    transition: transform 0.3s ease;
}

.wp-popup-trigger:hover {
    transform: scale(1.05);
}

/* Prevent scrolling on html and body */
html.popup-open, body.popup-open {
    overflow: hidden !important;
    height: 100%;
}

/* Prevent horizontal scroll issues */
body.popup-open {
    overflow-x: hidden;
}

/* Table styles for popup content */
.wp-popup-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

.wp-popup-content th,
.wp-popup-content td {
    border: 1px solid #ddd;
    padding: 8px;
   text-align:center;
}

.wp-popup-content th {
/*     background-color: #f2f2f2; */
    font-weight: bold;
	background-color: #78537c;
	
}

/* Responsive table */
@media screen and (max-width: 600px) {
    .wp-popup-content table {
        border: 0;
    }
    
    .wp-popup-content table caption {
        font-size: 1.3em;
    }
    
    .wp-popup-content table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    
    .wp-popup-content table tr {
        border-bottom: 3px solid #ddd;
        display: block;
        margin-bottom: .625em;
    }
    
    .wp-popup-content table td {
        border-bottom: 1px solid #ddd;
        display: block;
        font-size: .8em;
        text-align: right;
        min-height: 50px;
        background-color: #78537c; 
		padding-right: 35px;
    }
    
    .wp-popup-content table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
		margin-left: 35px;
    }
    
    .wp-popup-content table td:last-child {
        border-bottom: 0;
    }
}



/* Responsive styles */
@media screen and (max-width: 768px) {
    .wp-popup-content {
        width: 95%;
        padding: 15px;
    }

    .wp-popup-content-header {
        padding: 10px 0;
    }

    .wp-popup-content-header h2 {
        font-size: 20px;
    }

    .wp-popup-content-body {
        padding-top: 10px;
    }
}

@media screen and (max-width: 480px) {
    .wp-popup-content {
        width: 100%;
        padding: 10px;
        margin: 10px auto;
    }

    .wp-popup-content-header h2 {
        font-size: 18px;
    }

    .wp-popup-close {
        font-size: 24px;
        width: 30px;
        height: 30px;
    }
}

/* Webkit browsers custom scrollbar */
.wp-popup::-webkit-scrollbar,
.wp-popup-content-body::-webkit-scrollbar {
    width: 8px;
}

.wp-popup::-webkit-scrollbar-track,
.wp-popup-content-body::-webkit-scrollbar-track {
    background: #2d3436;
}

.wp-popup::-webkit-scrollbar-thumb,
.wp-popup-content-body::-webkit-scrollbar-thumb {
    background-color: #191b1b;
    border-radius: 20px;
    border: 2px solid #2d3436;
}
