/* =========================
   General Modal Styles
========================= */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Shared modal content (base) */
.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 5px;
    width: 320px;
    text-align: center;
    position: relative;
    box-sizing: border-box;
    color: #000;
    z-index: 1001;
    font-family: 'Lucida Sans','Lucida Sans Regular','Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;
}

/* Inputs in modals */
.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Close button (default) */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close:hover,
.close:focus { color: #000; text-decoration: none; }

/* Buttons (default) */
button {
    margin: 10px 0;
    padding: 10px;
    background-color: #0050ff;
    color: #fff;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    width: 280px;
}
button:hover { background-color: #0042d0; }

#forgotLink { color: #000; text-decoration: none; }

/* Required Field Asterisk */
.required::after { content: "*"; color: red; }

/* Switch link under forms */
.switch-modal {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}
.switch-modal a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.switch-modal a:hover { color: #0042d0; }

/* Terms row (base) */
.terms-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin: 10px 0;
}
.terms-container a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}
.terms-container a:hover { color: #0042d0; }

/* Toast/notification */
.notification-modal {
    display: none;
    position: fixed;
    top: 20px; left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0,0,0,0.8);
    color: #fff;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}
.notification-modal.show { display: block; opacity: 1; }

/* =========================
   Register Modal (scoped)
========================= */

/* Compact container + center children */
#registerModal .modal-content {
    width: 340px;
    margin: 8% auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    align-items: center; /* center inner column */
}

/* Make labels inside register modal consistent */
#registerModal label {
    font-family: 'Lucida Sans','Lucida Sans Regular','Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;
    font-size: 14px;
}

/* Title row: left title + right X */
#registerModal h2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 22px;
    margin: 0 0 12px;
    line-height: 1.1;
}
#registerModal .close {
    float: none;          /* override base */
    position: static;
    font-size: 26px;
    font-weight: bold;
    color: #666;
    margin-left: auto;
    cursor: pointer;
}
#registerModal .close:hover { color: #000; }

/* Center the form stack as a column */
#registerModal form {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Inputs/selects sizing within the column */
#registerModal input[type="text"],
#registerModal input[type="email"],
#registerModal input[type="password"],
#registerModal select {
    height: 36px;
    padding: 8px 10px;
    font-size: 14px;
    font-family: 'Lucida Sans','Lucida Sans Regular','Lucida Grande','Lucida Sans Unicode',Geneva,Verdana,sans-serif;
    margin: 4px 0;
    width: 100%;
    box-sizing: border-box;
}

/* Compact terms row inside the same column */
#registerModal .terms-container {
    align-items: flex-start;
    gap: 8px;
    margin: 6px 0 2px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 13px;
    line-height: 1.3;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}
#registerModal #termsCheckbox {
    width: 16px; height: 16px;
    margin-top: 2px;
}

/* Button fills the inner column width */
#registerModal button[type="submit"] {
    width: 100%;
    max-width: 320px;
    height: 40px;
    font-size: 16px;
    border-radius: 6px;
    margin-left: auto;
    margin-right: auto;
}

/* Switch link width matches column */
#registerModal .switch-modal {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* Small screens */
@media (max-width: 480px) {
    #registerModal .modal-content { width: 92vw; }
}

/* Toast text must stay white regardless of global <p> styles */
#notificationModal,
#notificationModal * {
    color: #fff !important;
}

#notificationModal #notificationMessage {
    margin: 0;           /* remove default <p> margin so text centers nicely */
    line-height: 1.2;
}

/* Fix radio alignment: don't stretch to 100% */
#editListingForm input[type="radio"],
#createListingForm input[type="radio"] {
    width: auto;
    height: auto;
    margin: 0;
}

/* Stack choices neatly; keep bubble + label on the same line */
.radio-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}



