/* Core Styling */
html, body {
    background-color: #E7E9EA;
}
.sps-container {
    background-color: #E7E9EA;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding: 20px;
    box-sizing: border-box;
}

#sps-main-content {
    width: 100%;
    max-width: 890px;
    padding: 5%;
    box-sizing: border-box;
    background-color: #E7E9EA;
}

/* Success and Error Pages */
#sps-success-page,
#sps-error-page {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 500px;
    padding: 40px;
    box-sizing: border-box;
    background-color: #E7E9EA;
    animation: fade-in 0.5s ease-out forwards;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Typography */
.sps-heading {
    font-size: 2rem;
    font-weight: 900;
    color: #212529;
    text-align: center;
    margin-bottom: 10px;
}

.sps-question {
    font-size: 1.1rem;
    color: #495057;
    margin-bottom: 30px;
    text-align: center;
}

.sps-agreement {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: center;
}

/* Form Fields */
.sps-field {
    margin-bottom: 20px;
}

.sps-field label {
    display: block;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 8px;
    font-weight: 500;
}

.sps-field input,
.sps-field textarea {
    width: 100%;
    padding: 18px 18px !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 8px !important;
    font-size: 1rem;
    color: #212529;
    background-color: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sps-field input:focus,
.sps-field textarea:focus {
    border-color: #191919;
    outline: none;
    box-shadow: 0 0 0 1px #191919;
}

.sps-field textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.sps-btn {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
    border: none;
    width: 100%;
}

.sps-btn-dark {
    background-color: #191919;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-decoration: none;
}

.sps-btn-dark:hover {
    background-color: #000;
    color: #fff;
}

.sps-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* Button Loader Animation */
.sps-btn-dark.loading {
    cursor: default;
    background-color: #333;
    animation: pulse 1s infinite alternate;
}

.sps-btn-dark.loading .text {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.sps-btn-dark.loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.sps-btn-dark.loading.complete {
    background-color: #28a745;
    animation: none;
}

.sps-btn-dark.loading.complete::after {
    content: '✓';
    font-size: 1.2rem;
    border: none;
    animation: none;
    transform: translate(-50%, -50%) scale(1.2);
    transition: transform 0.3s ease;
}

/* Inline Validation/Error */
.sps-message-inline {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 15px;
}

/* Turnstile Widget Styling */
#turnstile-widget {
    margin: 20px auto;
}