/* New Unique Modal Styles to Avoid Conflicts */

/* Base Overlay */
.modal-overlay-new {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh; /* Use dynamic viewport height */
    z-index: 2147483647;
    background-color: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    padding: 20px;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    touch-action: none; /* Prevent scroll */
}

.modal-overlay-new.active {
    display: flex !important;
}

/* The Card Itself */
.modal-card-new {
    background-color: #fff;
    width: 90%;
    max-width: 420px;
    margin: auto;
    padding: 0; /* Strict zero padding */
    border-radius: 24px;
    overflow: hidden; /* Clips children to rounded corners */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

@keyframes slideUpFade {
    from { transform: translateY(20px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Header Section - FLEXBOX LAYOUT */
.modal-header-new {
    background-color: #A1FD02;
    padding: 20px;
    text-align: center; /* Center the title */
    border-bottom: 1px solid rgba(0,0,0,0.05);
    flex-shrink: 0;
    position: relative; /* Anchor for absolute close button */
}

.modal-header-new h3 {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #000;
}

.close-btn-new {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 32px; /* Large, bold X */
    font-weight: 800; /* Extra thick */
    color: #000; /* Thick black color */
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    line-height: 1;
    padding: 0;
    transition: opacity 0.2s;
}

.close-btn-new:hover {
    opacity: 0.6;
}

/* Body Section */
.modal-body-new {
    padding: 24px;
    overflow-y: auto;
    background-color: #fff;
}

/* Form Elements */
.modal-body-new form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-body-new input,
.modal-body-new select,
.modal-body-new textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #f0f0f0;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    background-color: #fcfcfc;
    transition: all 0.2s;
    outline: none;
}

.modal-body-new input:focus,
.modal-body-new select:focus,
.modal-body-new textarea:focus {
    border-color: #A1FD02;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(161, 253, 2, 0.15);
}

.modal-body-new button.btn-submit-new {
    background-color: #000;
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    padding: 16px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    margin-top: 8px;
    transition: transform 0.2s, background 0.2s;
}

.modal-body-new button.btn-submit-new:active {
    transform: scale(0.98);
}

/* Body Lock Helper */
body.modal-locked {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}