.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1200;
    font-family: Arial, sans-serif;
}

.modal-content {
    background-color: #fdfbf8;
    color: #7f2549;
    padding: 25px 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-size: calc(8px + 0.5vw);
}

.modal-content h2 {
    text-align: center;
    margin-top: 0;
    color: #7f2549;
}

.modal-content label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content button {
    width: 100%;
    padding: 10px;
    margin-top: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    box-sizing: border-box;
    font-family: inherit;
}

.modal-content button {
    background-color: #7f2549;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    margin-top: 20px;
}

.modal-content button:hover {
    background-color: #5a1a3a;
}

.checkbox-group label {
    font-weight: normal;
    display: block;
    margin-top: 8px;
    font-size: 0.95em;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.close-button:hover {
    color: #000;
}

.modal-content {
    position: relative; /* Needed for absolute positioning inside */
}

@media screen and (max-width: 480px) {
  .modal-content {
    padding: 16px 12px;
    font-size: 14px;
    width: 95%;
    max-width: 320px;
    max-height: 80vh;         /* Limit height to 80% of viewport */
    overflow-y: auto;         /* Scroll only if content exceeds */
  }

  .modal-content h2 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .modal-content input[type="text"],
  .modal-content input[type="email"],
  .modal-content button {
    font-size: 14px;
    padding: 8px;
  }

  .close-button {
    font-size: 20px;
    top: 8px;
    right: 12px;
  }
}
