/**
 * Business Risk Stress Test - Public Styles
 */

/* Variables */
:root {
    --brst-primary: #3498db;
    --brst-primary-dark: #2980b9;
    --brst-secondary: #2c3e50;
    --brst-success: #27ae60;
    --brst-warning: #f39c12;
    --brst-danger: #e74c3c;
    --brst-info: #17a2b8;
    --brst-light: #f8f9fa;
    --brst-dark: #343a40;
    --brst-gray: #6c757d;
    --brst-border: #dee2e6;
    --brst-radius: 8px;
    --brst-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Container */
.brst-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Form Title */
.brst-form-title {
    color: var(--brst-secondary);
    margin-bottom: 10px;
    font-size: 28px;
}

.brst-form-description {
    color: var(--brst-gray);
    margin-bottom: 30px;
    font-size: 16px;
}

/* Progress Bar */
.brst-progress-bar {
    margin-bottom: 30px;
}

.brst-progress-track {
    height: 8px;
    background: var(--brst-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.brst-progress-fill {
    height: 100%;
    background: var(--brst-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Progress text hidden - we only show the bar */
.brst-progress-text {
    display: none;
}

/* Form Steps */
.brst-form-step {
    display: none;
}

.brst-form-step.active {
    display: block;
}

/* Step title - hidden when empty, clean look for one-question-per-page */
.brst-step-title {
    color: var(--brst-secondary);
    font-size: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--brst-primary);
}

.brst-step-title:empty {
    display: none;
    margin: 0;
    padding: 0;
    border: none;
}

/* Fields */
.brst-field {
    margin-bottom: 25px;
}

.brst-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--brst-secondary);
    font-size: 16px;
    line-height: 1.5;
}

.brst-required {
    color: var(--brst-danger);
}

/* Radio Group */
.brst-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brst-radio-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--brst-light);
    border: 2px solid transparent;
    border-radius: var(--brst-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.brst-radio-option:hover {
    background: #e9ecef;
    border-color: var(--brst-primary);
}

.brst-radio-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    accent-color: var(--brst-primary);
}

.brst-radio-option input[type="radio"]:checked + .brst-radio-label {
    color: var(--brst-primary);
    font-weight: 600;
}

.brst-radio-option:has(input:checked) {
    background: #e3f2fd;
    border-color: var(--brst-primary);
}

/* Checkbox */
.brst-checkbox-single,
.brst-consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.brst-checkbox-single input,
.brst-consent-checkbox input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--brst-primary);
}

/* Input Fields */
.brst-input,
.brst-email-input,
.brst-text-input,
.brst-textarea,
.brst-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--brst-border);
    border-radius: var(--brst-radius);
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.brst-input:focus,
.brst-email-input:focus,
.brst-text-input:focus,
.brst-textarea:focus,
.brst-select:focus {
    outline: none;
    border-color: var(--brst-primary);
}

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

/* Field Error */
.brst-field-error {
    color: var(--brst-danger);
    font-size: 14px;
    margin-top: 8px;
}

.brst-field.has-error .brst-input,
.brst-field.has-error .brst-radio-option {
    border-color: var(--brst-danger);
}

/* Buttons */
.brst-btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--brst-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.brst-btn-primary {
    background: var(--brst-primary);
    color: white;
}

.brst-btn-primary:hover {
    background: var(--brst-primary-dark);
}

.brst-btn-primary:disabled {
    background: var(--brst-gray);
    cursor: not-allowed;
}

.brst-btn-secondary {
    background: var(--brst-light);
    color: var(--brst-secondary);
    border: 2px solid var(--brst-border);
}

.brst-btn-secondary:hover {
    background: #e9ecef;
}

/* Step Navigation */
.brst-step-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--brst-border);
}

.brst-step-navigation .brst-btn {
    flex: 1;
    max-width: 200px;
}

/* Loading */
.brst-loading {
    text-align: center;
    padding: 40px 20px;
}

.brst-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--brst-light);
    border-top-color: var(--brst-primary);
    border-radius: 50%;
    animation: brst-spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

/* Mini Report */
.brst-mini-report {
    background: white;
    border-radius: var(--brst-radius);
    box-shadow: var(--brst-shadow);
    overflow: hidden;
    margin-top: 20px;
}

.brst-mini-report-header {
    background: var(--brst-secondary);
    color: white;
    padding: 25px;
    text-align: center;
}

.brst-mini-report-title {
    margin: 0 0 15px;
    font-size: 24px;
}

.brst-profile-badge {
    display: inline-block;
    background: var(--brst-primary);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-size: 18px;
    font-weight: 600;
}

.brst-mini-report-content {
    padding: 30px;
}

.brst-alignment-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    border-radius: var(--brst-radius);
    margin-bottom: 20px;
    font-weight: 600;
}

.brst-alignment-indicator.aligned {
    background: #d4edda;
    color: var(--brst-success);
}

.brst-alignment-indicator.not_aligned {
    background: #fff3cd;
    color: var(--brst-warning);
}

.brst-alignment-indicator.excellent {
    background: #d4edda;
    color: #155724;
    border: 2px solid var(--brst-success);
}

/* All YES report styling */
.brst-all-yes-report {
    border-color: var(--brst-success);
}

.brst-all-yes-report .brst-profile-badge {
    background: var(--brst-success);
}

.brst-all-yes-report .brst-profile-badge.all_yes {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

.brst-mini-report-summary {
    font-size: 16px;
    line-height: 1.7;
    color: var(--brst-secondary);
    margin-bottom: 25px;
}

.brst-score-display,
.brst-focus-display {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background: var(--brst-light);
    border-radius: var(--brst-radius);
    margin-bottom: 15px;
}

.brst-score-label,
.brst-focus-label {
    font-weight: 600;
    color: var(--brst-secondary);
}

.brst-score-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--brst-primary);
}

/* Category Scores in Mini Report */
.brst-category-scores {
    margin: 25px 0;
    padding: 20px;
    background: var(--brst-light);
    border-radius: var(--brst-radius);
}

.brst-category-scores-title {
    margin: 0 0 18px;
    font-size: 16px;
    font-weight: 600;
    color: var(--brst-secondary);
}

.brst-category-score-item {
    margin-bottom: 14px;
}

.brst-category-score-item:last-child {
    margin-bottom: 0;
}

.brst-category-score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.brst-category-scores .brst-category-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--brst-secondary);
}

.brst-category-percentage {
    font-size: 14px;
    font-weight: 600;
    color: var(--brst-gray);
}

.brst-category-score-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.brst-category-score-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.brst-category-score-fill.brst-score-high {
    background: var(--brst-success);
}

.brst-category-score-fill.brst-score-medium {
    background: var(--brst-warning);
}

.brst-category-score-fill.brst-score-low {
    background: var(--brst-danger);
}

.brst-mini-report-cta {
    background: var(--brst-light);
    padding: 25px;
    text-align: center;
}

.brst-cta-description {
    margin-bottom: 20px;
    color: var(--brst-gray);
}

/* Payment Container */
.brst-payment-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.brst-payment-header {
    text-align: center;
    margin-bottom: 30px;
}

.brst-payment-header h2 {
    color: var(--brst-secondary);
    margin-bottom: 10px;
}

.brst-payment-description {
    color: var(--brst-gray);
}

.brst-payment-summary {
    background: var(--brst-light);
    padding: 20px;
    border-radius: var(--brst-radius);
    margin-bottom: 25px;
}

.brst-payment-summary h3 {
    margin-top: 0;
    color: var(--brst-secondary);
}

.brst-payment-summary ul {
    margin: 0;
    padding-left: 20px;
}

.brst-payment-summary li {
    margin-bottom: 8px;
    color: var(--brst-gray);
}

.brst-payment-amount {
    text-align: center;
    padding: 20px;
    background: var(--brst-secondary);
    color: white;
    border-radius: var(--brst-radius);
    margin-bottom: 25px;
}

.brst-currency {
    font-size: 18px;
    margin-right: 5px;
}

.brst-amount {
    font-size: 36px;
    font-weight: 700;
}

.brst-consent-section {
    margin-bottom: 20px;
}

.brst-consent-section label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
    cursor: pointer;
}

.brst-consent-warning {
    background: #fff3cd;
    color: #856404;
    padding: 12px 15px;
    border-radius: var(--brst-radius);
    margin-bottom: 15px;
    font-size: 14px;
}

.brst-payment-secure {
    text-align: center;
    margin-top: 20px;
    color: var(--brst-gray);
    font-size: 14px;
}

/* Email Capture */
.brst-email-capture-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.brst-email-capture-header {
    margin-bottom: 25px;
}

.brst-email-capture-form .brst-field {
    text-align: left;
}

/* Feedback */
.brst-feedback-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.brst-feedback-header {
    text-align: center;
    margin-bottom: 30px;
}

.brst-feedback-question {
    margin-bottom: 30px;
}

.brst-question-label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--brst-secondary);
}

.brst-rating-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.brst-rating-option {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.brst-rating-option input {
    display: none;
}

.brst-rating-value {
    display: block;
    width: 50px;
    height: 50px;
    line-height: 50px;
    margin: 0 auto 8px;
    background: var(--brst-light);
    border: 2px solid var(--brst-border);
    border-radius: 50%;
    font-size: 20px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.brst-rating-option:hover .brst-rating-value {
    border-color: var(--brst-primary);
    background: #e3f2fd;
}

.brst-rating-option input:checked + .brst-rating-value {
    background: var(--brst-primary);
    border-color: var(--brst-primary);
    color: white;
}

.brst-rating-label {
    display: block;
    font-size: 12px;
    color: var(--brst-gray);
}

.brst-feedback-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--brst-border);
    border-radius: var(--brst-radius);
    font-size: 16px;
    resize: vertical;
    box-sizing: border-box;
}

.brst-feedback-submit {
    text-align: center;
    margin-top: 30px;
}

/* Thank You */
.brst-feedback-thank-you {
    text-align: center;
    padding: 50px 20px;
}

.brst-thank-you-icon {
    width: 80px;
    height: 80px;
    line-height: 80px;
    background: var(--brst-success);
    color: white;
    font-size: 40px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

/* Results */
.brst-results-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.brst-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.brst-primary-profile {
    text-align: center;
    margin-bottom: 30px;
}

.brst-profile-description {
    color: var(--brst-gray);
    margin-top: 15px;
}

.brst-score-breakdown {
    margin-bottom: 30px;
}

.brst-score-bar-item {
    margin-bottom: 20px;
}

.brst-score-bar-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.brst-category-name {
    font-weight: 600;
    color: var(--brst-secondary);
}

.brst-category-score {
    color: var(--brst-gray);
}

.brst-score-bar-track {
    height: 12px;
    background: var(--brst-light);
    border-radius: 6px;
    overflow: hidden;
}

.brst-score-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.5s ease;
}

.brst-alignment-section {
    margin-top: 30px;
}

.brst-alignment-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    border-radius: var(--brst-radius);
}

.brst-alignment-status.aligned {
    background: #d4edda;
    color: var(--brst-success);
}

.brst-alignment-status.not_aligned {
    background: #fff3cd;
    color: #856404;
}

/* Error Message */
.brst-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: var(--brst-radius);
    text-align: center;
}

/* Messages */
.brst-form-messages,
.brst-feedback-messages,
.brst-email-capture-messages {
    margin-top: 15px;
}

/* Gateway Selection */
.brst-gateway-selection {
    margin-bottom: 25px;
}

.brst-gateway-selection h4 {
    margin-bottom: 15px;
    color: var(--brst-secondary);
}

.brst-gateway-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brst-gateway-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--brst-light);
    border: 2px solid transparent;
    border-radius: var(--brst-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.brst-gateway-option:hover {
    background: #e9ecef;
    border-color: var(--brst-primary);
}

.brst-gateway-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--brst-primary);
}

.brst-gateway-option.selected,
.brst-gateway-option:has(input:checked) {
    background: #e3f2fd;
    border-color: var(--brst-primary);
}

.brst-gateway-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brst-gateway-name {
    font-weight: 600;
    color: var(--brst-secondary);
}

.brst-gateway-badge {
    font-size: 12px;
    background: var(--brst-primary);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 10px;
}

/* Stripe Modal */
.brst-stripe-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.brst-stripe-modal {
    background: white;
    border-radius: var(--brst-radius);
    width: 90%;
    max-width: 400px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.brst-stripe-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.brst-stripe-modal-header h3 {
    margin: 0;
    color: var(--brst-secondary);
}

.brst-stripe-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--brst-gray);
    padding: 0;
    line-height: 1;
}

.brst-stripe-modal-close:hover {
    color: var(--brst-secondary);
}

.brst-stripe-element {
    padding: 12px 15px;
    border: 2px solid var(--brst-border);
    border-radius: var(--brst-radius);
    margin-bottom: 20px;
}

.brst-stripe-element:focus-within {
    border-color: var(--brst-primary);
}

.brst-stripe-error {
    color: var(--brst-danger);
    font-size: 14px;
    margin-bottom: 15px;
}

/* Payment Processing */
.brst-payment-processing {
    text-align: center;
    padding: 30px;
}

.brst-payment-processing .brst-spinner {
    margin-bottom: 15px;
}

/* Success Animation */
.brst-payment-success {
    text-align: center;
    padding: 40px 20px;
}

.brst-success-icon {
    width: 80px;
    height: 80px;
    background: var(--brst-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 40px;
    animation: brst-scale-in 0.3s ease;
}

@keyframes brst-scale-in {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.brst-payment-success h3 {
    color: var(--brst-success);
    margin-bottom: 15px;
}

/* Field Description */
.brst-field-description {
    font-size: 14px;
    color: var(--brst-gray);
    margin-top: 8px;
}

/* Payment Email Field */
.brst-payment-email-field {
    margin-bottom: 25px;
}

.brst-payment-email-field .brst-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--brst-secondary);
    font-size: 15px;
}

.brst-payment-email-field .brst-email-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--brst-border);
    border-radius: var(--brst-radius);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.brst-payment-email-field .brst-email-input:focus {
    outline: none;
    border-color: var(--brst-primary);
}

/* Gateway Info Block */
.brst-gateway-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brst-gateway-desc {
    font-size: 13px;
    color: var(--brst-gray);
}

/* Privacy Note */
.brst-privacy-note {
    background: var(--brst-light);
    padding: 15px 20px;
    border-radius: var(--brst-radius);
    margin-bottom: 20px;
    border-left: 4px solid var(--brst-primary);
}

.brst-privacy-note p {
    margin: 0;
    font-size: 13px;
    color: var(--brst-gray);
    line-height: 1.6;
}

/* Full Width Button */
.brst-btn-full {
    width: 100%;
    display: block;
}

/* Email Capture Improvements */
.brst-email-capture-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.brst-email-capture-header {
    text-align: center;
    margin-bottom: 25px;
}

.brst-email-capture-header h2 {
    color: var(--brst-success);
    margin-bottom: 10px;
}

.brst-email-capture-header p {
    font-size: 18px;
    color: var(--brst-secondary);
    font-weight: 500;
}

.brst-email-capture-form .brst-field {
    text-align: left;
    margin-bottom: 18px;
}

.brst-email-capture-form .brst-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--brst-secondary);
    font-size: 14px;
}

.brst-email-capture-form .brst-field input[type="email"],
.brst-email-capture-form .brst-field input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid var(--brst-border);
    border-radius: var(--brst-radius);
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.brst-email-capture-form .brst-field input:focus {
    outline: none;
    border-color: var(--brst-primary);
}

.brst-consent-field {
    margin-bottom: 20px;
}

.brst-consent-field .brst-checkbox-single span {
    font-size: 13px;
    color: var(--brst-gray);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .brst-form-container,
    .brst-payment-container,
    .brst-feedback-container {
        padding: 15px;
    }

    .brst-form-title {
        font-size: 24px;
    }

    .brst-step-navigation {
        flex-direction: column;
    }

    .brst-step-navigation .brst-btn {
        max-width: none;
    }

    .brst-rating-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .brst-rating-option {
        flex: 0 0 60px;
    }

    .brst-rating-value {
        width: 45px;
        height: 45px;
        line-height: 45px;
        font-size: 18px;
    }

    .brst-gateway-options {
        flex-direction: column;
    }

    .brst-stripe-modal {
        width: 95%;
        padding: 20px;
    }
}
