/* =========================================================
   TOAST
========================================================= */

.toast {
    position: fixed;
    top: 20px;
    right: -400px; /* start hidden */
    min-width: 260px;
    max-width: 360px;
    padding: 14px 18px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 9999;
    opacity: 0;
    transition: right 0.4s ease, opacity 0.4s ease;
}

/* visible state */
.toast.show {
    right: 20px;
    opacity: 1;
}

/* success */
.toast.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

/* error */
.toast.error {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

/* optional icon spacing */
.toast strong {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

/* Popup overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =========================================================
   POP UP
========================================================= */

.popup-box {
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    
    /* Responsive width */
    width: 90%;
    max-width: 800px; /* Maximum width for large screens */
    
    /* For desktop */
    @media (min-width: 1025px) {
        width: 60%;
    }
    
    /* For tablets in landscape */
    @media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
        width: 70%;
    }
    
    /* For tablets in portrait */
    @media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
        width: 80%;
    }
    
    
}

.popup-header {
    padding: 10px 15px;
    background: #ef6c00;
    color:  #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.pop2-header {
    padding: 10px 15px;
    background: #512da8;
    color:  #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pop2-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.popup-content {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 70px); /* Adjust based on header height */
    
    /* Sample content styling */
    p {
        margin-bottom: 15px;
    }
}

/* 1. Make the wrapper control the horizontal scroll */
.poptable-container {
    width: 100%;             /* Takes up the width of the popup */
    overflow-x: auto;        /* Enables horizontal scrollbar when content overflows */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile devices */
}

/* 2. Prevent the table from shrinking to fit */
.poptable-container table {
    min-width: 800px;        /* Set this to your desired minimum width */
    width: 100%;             /* Fills the container if wider than min-width */
    border-collapse: collapse;
}

/* 3: Prevent text from wrapping into multiple lines */
.poptable-container th, 
.poptable-container td {
    white-space: nowrap;
}

/* 4. Only targets header cells inside .table-container */
.poptable-container th {
    background-color: #fde3b6;
    color: #3b4856;
    font-weight: normal;
    padding: 12px 16px;
    border-right: 2px solid #ffffff;
}

/* 5. Removes the divider on the last column only inside .table-container */
.poptable-container th:last-child {
    border-right: none;
}