.mmtf-popup-overlay {
    display: none; /* Hidden by default, will be flex when shown */
    position: fixed; /* Stay in place */
    z-index: 999999; /* Sit on top of everything */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.mmtf-popup-content {
    background-color: #fefefe;
    margin: 5% auto; /* Smaller margin for mobile */
    padding: 20px;
    border: 1px solid #888;
    width: 90%; /* Wider on mobile */
    max-width: 600px;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2), 0 6px 20px 0 rgba(0,0,0,0.19);
    max-height: 90vh; /* Prevent overflow on mobile */
    overflow-y: auto; /* Enable scroll within popup if needed */
}

@media screen and (max-width: 600px) {
    .mmtf-popup-content {
        width: 95%;
        padding: 15px;
        margin: 2% auto;
    }
    
    .mmtf-form-group input[type="text"],
    .mmtf-form-group input[type="email"],
    .mmtf-form-group input[type="tel"],
    .mmtf-form-group textarea {
        font-size: 16px; /* Prevent auto-zoom on iOS */
    }
}

.mmtf-close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.mmtf-close-button:hover,
.mmtf-close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.mmtf-form-group {
    margin-bottom: 15px;
}

.mmtf-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.mmtf-form-group input[type="text"],
.mmtf-form-group input[type="email"],
.mmtf-form-group input[type="tel"],
.mmtf-form-group textarea {
    width: calc(100% - 22px); /* Account for padding and border */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.mmtf-form-group textarea {
    resize: vertical;
}

#mmtf-service-options label.mmtf-checkbox-label {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
}

#mmtf-pay-button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

#mmtf-pay-button:hover {
    background-color: #45a049;
}
