/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 1; /* Ensures the body content stays below the popup */
    background-color: #f4f7f6; /* Soft background */
    color: #333;
}

/* Popup Form Styles */
.popup {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Slightly darker backdrop */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* High z-index to bring popup to the front */
}

.popup-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    text-align: left; /* Left aligned for more professional look */
    position: relative;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
    animation: popup-slide-in 0.4s ease-out; /* Animation for smooth popup */
}

/* Popup animation */
@keyframes popup-slide-in {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Close Button */
.close {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    font-size: 30px;
    color: #000000;
    transition: color 0.2s ease;
}

.close:hover {
    color: #ff2e2e;
}

/* Form Styles */
form label {
    display: block;
    margin-bottom: 6px;
    font-size: 20px;
    text-decoration: 1em;
    color: black;
}

form input, form textarea {
    width: calc(100% - 20px);
    padding: 14px;
    margin: 8px 0 10px 0;
    border: 1px solid #000000;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

form input:focus, form textarea:focus {
    border-color: #4CAF50;
    outline: solid 1px  #4CAF50;
    border-radius: 6px;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.2);
}

form button {
    background-color: #4CAF50;
    color: white;
    padding: 14px;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    width: 100%;
    transition: background-color 0.3s, box-shadow 0.3s;
    font-size: 16px;
}

form button:hover {
    background-color: #43a047;
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.4);
}

/* Align Labels and Inputs */
form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

form .form-group-inline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

form .form-group-inline label {
    flex: 1;
    margin-right: 10px;
    font-size: 15px;
}

form .form-group-inline input {
    flex: 2;
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .popup-content {
        padding: 20px;
        max-width: 300px; /* Reduce max width for smaller screens */
        width: 90%; /* Make sure the popup takes up 90% of the screen width */
        max-height: 90vh; /* Limit height to fit smaller screens */
        overflow-y: auto; /* Add scroll if content exceeds screen height */
    }

    form label {
        font-size: 18px; /* Slightly smaller font for mobile */
    }

    form input, form textarea {
        padding: 10px;
        font-size: 14px; /* Smaller font for mobile inputs */
    }

    form button {
        padding: 12px;
        font-size: 14px; /* Smaller font for mobile button */
    }
}
