.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

/* Hide login buttons initially */
#login-button,
.floating-menu-button {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

/* glueup.js sets id="login-button" on whatever element the theme nav gives it — often the <li>,
   not the <a> inside it — then swaps its text in place rather than leaving an <a> for the browser
   to recognise as a link. This keeps the hand cursor on hover regardless of which element it is. */
#login-button {
    cursor: pointer;
}

/* Show buttons after JavaScript sets state */
#login-button.state-ready,
.floating-menu-button.state-ready {
    opacity: 1;
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 4px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    top: 10px;
    right: 15px;
}

.close:hover {
    color: #666;
}

.glueup-form {
    margin-top: 20px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.signin-button {
    width: 100%;
    padding: 10px;
    background-color: #1e1e32;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.signin-button:hover {
    background-color: #2a2a45;
}

.form-links {
    margin-top: 15px;
    font-size: 14px;
}

.form-links p {
    margin: 5px 0;
}

.form-links a {
    color: #1e1e32;
    text-decoration: none;
}

.error-message {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: none;
}
/* Loading spinner positioned relative to modal-content */
.cdp-spinner {
	position: absolute;
    left: calc(50% - 30px);
    top: calc(50% - 30px);
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--brand-accent, #f0b800);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 0 auto 20px;
}
	
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}