/* Standalone page shell styles */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background: #f0f2f5;
}

a {
    color: #96030A;
}

a:hover {
    color: #BC0000;
}

/* Main wrapper */
.saps-standalone-wrap {
    max-width: 960px;
    margin: 0 auto;
    background: #fff;
    min-height: 100vh;
    padding: 0 24px 40px;
}

.saps-standalone-spacer {
    height: 40px;
}

/* Page heading */
.saps-standalone-wrap > h1 {
    font-family: "Roboto", sans-serif;
    text-align: center;
    margin: 0 0 8px;
    font-size: 38px;
    color: #1a1a1a;
}

/* Intro paragraph */
.saps-standalone-intro {
    text-align: center;
    color: #666;
    margin: 0 0 20px;
}

/* Disclaimer box */
.saps-standalone-disclaimer {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: #6d5a00;
    text-align: center;
}

/* User bar */
.saps-standalone-user-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Auth section wrapper */
.saps-auth-section {
    max-width: 400px;
    margin: 0 auto;
}

.saps-auth-section h2 {
    font-family: "Roboto", sans-serif;
    margin-top: 0;
    text-align: center;
}

/* Auth form inputs: extend text input styles to email and password */
.saps-auth-section .saps-form-group input[type="email"],
.saps-auth-section .saps-form-group input[type="password"],
.saps-auth-section .saps-form-group input[type="text"] {
    width: 100%;
    max-width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.saps-auth-section .saps-btn-primary {
    width: 100%;
    padding: 10px 16px;
}

/* Auth form loading state */
.saps-btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

.saps-btn-loading .saps-btn-text {
    visibility: hidden;
}

.saps-btn-loading .saps-spinner {
    display: inline-block;
}

.saps-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: saps-spin 0.6s linear infinite;
}

@keyframes saps-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Auth links */
.saps-auth-links {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.saps-auth-links a {
    color: #96030A;
    text-decoration: none;
}

.saps-auth-links a:hover {
    color: #BC0000;
    text-decoration: underline;
}

/* Field hint text */
.saps-field-hint {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 12px;
}

/* Add section buttons row */
.saps-add-section-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Help modal */
.saps-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saps-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.saps-modal-content {
    position: relative;
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    max-width: 680px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.saps-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 4px 8px;
}

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

/* Licensing steps inside modal */
.saps-modal-content .saps-licensing-steps {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.saps-licensing-steps h3 {
    margin-top: 0;
}

.saps-licensing-steps h4 {
    margin: 20px 0 8px;
    color: #444;
}

.saps-steps-list {
    margin: 0 0 16px;
    padding-left: 24px;
}

.saps-steps-list li {
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Make open status badges clickable */
.saps-status-open {
    cursor: pointer;
}

.saps-status-open:hover {
    text-decoration: underline;
}

/* Footer branding */
.saps-standalone-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    font-size: 12px;
    color: #222222;
    font-weight: 600;
}

.saps-standalone-footer a {
    color: #96030A;
    text-decoration: none;
}

.saps-standalone-footer a:hover {
    color: #BC0000;
    text-decoration: underline;
}

.saps-standalone-footer img {
    display: block;
    margin: 12px auto 0;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .saps-standalone-wrap {
        padding: 0 16px 32px;
    }

    .saps-standalone-wrap > h1 {
        font-size: 34px;
    }

    .saps-standalone-user-bar {
        flex-direction: column;
        text-align: center;
    }
}
