/**
 * BizMusic Staff Access Styles
 *
 * 1. Staff login form on protected pages (/streams/, /player/)
 * 2. Staff credential modal in My Subscriptions
 * 3. Staff logout bar
 */

/* ==========================================================================
   1. Staff Login Form (protected pages)
   ========================================================================== */

.bizmusic-staff-login-wrap {
    display: flex;
    justify-content: center;
    padding: 2em 1em;
}

.bizmusic-staff-login-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2em;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bizmusic-staff-login-card h2 {
    margin: 0 0 0.5em;
    font-size: 1.4em;
    text-align: center;
}

.bizmusic-staff-login-card > p {
    color: #666;
    text-align: center;
    margin-bottom: 1.5em;
    font-size: 0.9em;
}

.bizmusic-staff-login-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 0.75em 1em;
    margin-bottom: 1em;
    font-size: 0.9em;
}

.bizmusic-staff-login-field {
    margin-bottom: 1em;
}

.bizmusic-staff-login-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3em;
    font-size: 0.9em;
}

.bizmusic-staff-login-field input {
    width: 100%;
    padding: 0.6em 0.8em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box;
}

.bizmusic-staff-login-field input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.bizmusic-staff-login-btn {
    display: block;
    width: 100%;
    padding: 0.75em;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5em;
}

.bizmusic-staff-login-btn:hover {
    background: #005a87;
}

.bizmusic-staff-login-alt {
    text-align: center;
    margin-top: 1.5em;
    font-size: 0.85em;
    color: #666;
}

.bizmusic-staff-login-alt a {
    color: #0073aa;
}

/* ==========================================================================
   2. Staff Credential Modal (lightbox)
   ========================================================================== */

/* Backdrop overlay */
.bizmusic-staff-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 100000;
    justify-content: center;
    align-items: center;
}

.bizmusic-staff-modal-overlay.is-open {
    display: flex;
}

/* Modal card */
.bizmusic-staff-modal {
    background: #fff;
    border-radius: 8px;
    padding: 2em;
    width: 90%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    animation: bizmusic-modal-in 0.2s ease-out;
}

@keyframes bizmusic-modal-in {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Close button */
.bizmusic-staff-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 1.4em;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
}

.bizmusic-staff-modal-close:hover {
    color: #333;
}

.bizmusic-staff-modal h3 {
    margin: 0 0 0.3em;
    font-size: 1.15em;
}

.bizmusic-staff-modal .bizmusic-staff-modal-subtitle {
    color: #666;
    font-size: 0.85em;
    margin: 0 0 1.2em;
}

/* Form fields inside modal */
.bizmusic-staff-modal .bizmusic-staff-field {
    margin-bottom: 0em;
}

.bizmusic-staff-modal .bizmusic-staff-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25em;
    font-size: 0.9em;
    color: #333;
}

.bizmusic-staff-modal .bizmusic-staff-field input {
    width: 100%;
    padding: 0.5em 0.7em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.bizmusic-staff-modal .bizmusic-staff-field input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.bizmusic-staff-pw-toggle {
    font-size: 0.8em;
    color: #0073aa;
    cursor: pointer;
    display: inline-block;
    margin-top: 0.25em;
}

/* Action buttons inside modal */
.bizmusic-staff-modal .bizmusic-staff-actions {
    display: flex;
    gap: 0.5em;
    margin-top: 1.2em;
}

.bizmusic-staff-save-btn,
.bizmusic-staff-delete-btn {
    padding: 0.5em 1.2em;
    border: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.bizmusic-staff-save-btn {
    background: #0073aa;
    color: #fff;
    flex: 1;
}

.bizmusic-staff-save-btn:hover {
    background: #005a87;
}

.bizmusic-staff-delete-btn {
    background: #be0202;
    color: #fff;
}

.bizmusic-staff-delete-btn:hover {
    background: #9a0101;
}

.bizmusic-staff-save-btn:disabled,
.bizmusic-staff-delete-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Feedback message inside modal */
.bizmusic-staff-message {
    font-size: 0.85em;
    padding: 0.5em 0.8em;
    border-radius: 4px;
    margin-top: 0.75em;
}

.bizmusic-staff-message--success {
    background: #d4edda;
    color: #155724;
}

.bizmusic-staff-message--error {
    background: #f8d7da;
    color: #721c24;
}

/* ==========================================================================
   3. Staff Logout Bar
   ========================================================================== */

.bizmusic-staff-logout-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #333;
    text-align: center;
    padding: 8px;
    z-index: 9999;
}

.bizmusic-staff-logout-bar a {
    color: #fff;
    text-decoration: none;
    font-size: 0.85em;
}

.bizmusic-staff-logout-bar a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   4. Responsive
   ========================================================================== */

@media screen and (max-width: 768px) {
    .bizmusic-staff-modal {
        width: 95%;
        padding: 1.5em;
    }

    .bizmusic-staff-modal .bizmusic-staff-actions {
        flex-direction: column;
        align-items: center;
    }

    .bizmusic-staff-modal .bizmusic-staff-actions .bizmusic-staff-save-btn,
    .bizmusic-staff-modal .bizmusic-staff-actions .bizmusic-staff-delete-btn {
        width: 100%;
        text-align: center;
    }

    .bizmusic-staff-login-card {
        padding: 1.5em;
    }
}
