
.dmr-self-check-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.dmr-header {
    text-align: center;
    margin-bottom: 30px;
}

.dmr-header h2 {
    margin: 0 0 10px;
    color: #333;
}

.dmr-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.dmr-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 20px;
    opacity: 0.4;
}

.dmr-progress-step.active {
    opacity: 1;
}

.dmr-progress-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ddd;
    color: #666;
    font-weight: bold;
    margin-bottom: 8px;
}

.dmr-progress-step.active .dmr-progress-number {
    background: linear-gradient(135deg, #256e29 0%, #1a4f1e 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 110, 41, 0.3);
}

.dmr-progress-label {
    font-size: 14px;
    color: #666;
}

.dmr-progress-step.active .dmr-progress-label {
    color: #256e29;
    font-weight: 600;
}

.dmr-form {
    background: white;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.dmr-step-content {
    transition: opacity 0.3s ease;
}

.dmr-step-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

.dmr-step-content h3 {
    margin-top: 0;
    color: #333;
}

.dmr-instructions {
    color: #666;
    margin-bottom: 20px;
}

.dmr-scale-legend {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-radius: 12px;
    margin-bottom: 35px;
    font-size: 14px;
    border: 1px solid rgba(37, 110, 41, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.dmr-scale-legend span {
    color: #256e29;
}

.dmr-scale-legend strong {
    font-size: 16px;
    margin-right: 5px;
}

.dmr-question {
    margin-bottom: 25px;
    padding: 30px;
    background: #ffffff;
    border: 2px solid #e8f5e9;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: relative;
}

.dmr-question legend {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.7;
    padding: 0;
    width: 100%;
    display: block;
    border-bottom: 2px solid #e8f5e9;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.dmr-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    padding: 20px 0 10px 0;
    flex-wrap: wrap;
}

.dmr-radio-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 12px 15px;
    border-radius: 10px;
    min-width: 60px;
    background: #f8f9fa;
    border: 2px solid transparent;
}

.dmr-radio-label.dmr-radio-checked {
    background: rgba(37, 110, 41, 0.12);
    border-color: #256e29;
    box-shadow: 0 2px 8px rgba(37, 110, 41, 0.2);
}

.dmr-radio-label:has(input[type="radio"]:checked) {
    background: rgba(37, 110, 41, 0.12);
    border-color: #256e29;
    box-shadow: 0 2px 8px rgba(37, 110, 41, 0.2);
}

.dmr-radio-label input[type="radio"] {
    margin-bottom: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.dmr-radio-label input[type="radio"]:checked + .dmr-radio-text {
    color: #1a4f1e;
    font-weight: 900;
    transform: scale(1.1);
}

.dmr-radio-text {
    font-size: 20px;
    font-weight: bold;
    color: #256e29;
}

.dmr-field {
    margin-bottom: 20px;
}

.dmr-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.dmr-field input[type="text"],
.dmr-field input[type="email"],
.dmr-field input[type="tel"],
.dmr-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.dmr-field textarea {
    resize: vertical;
    min-height: 80px;
}

.dmr-checkbox-field label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.dmr-checkbox-field input[type="checkbox"] {
    margin-right: 8px;
}

.required {
    color: #dc3232;
}

.dmr-disclaimer {
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 14px;
}

.dmr-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}

.dmr-btn {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
    border-style: solid;
    border-width: 2px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Primary: solid green → hover transparent + green text + green border */
.dmr-btn-primary {
    background-color: #256e29;
    color: #fff;
    border-color: #256e29;
    box-shadow: none;
}

.dmr-btn-primary:hover {
    background-color: transparent;
    background-image: none;
    color: #256e29;
    border-color: #256e29;
    box-shadow: none;
    transform: none;
}

/* Secondary: transparent + green outline → hover solid green */
.dmr-btn-secondary {
    background-color: transparent;
    color: #256e29;
    border-color: #256e29;
    box-shadow: none;
}

.dmr-btn-secondary:hover {
    background-color: #256e29;
    color: #fff;
    border-color: #256e29;
}

/* Results Page */
.dmr-results-wrapper {
    max-width: 600px;
    margin: 40px auto;
    padding: 20px;
}

.dmr-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.dmr-results-score {
    text-align: center;
    padding: 24px 28px;
    background: white;
    border: 2px solid #256e29;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(37, 110, 41, 0.15);
}

.dmr-score-circle {
    margin-bottom: 20px;
}

.dmr-score-number {
    font-size: 72px;
    font-weight: bold;
    color: #256e29;
}

.dmr-score-total {
    font-size: 24px;
    color: #666;
}

.dmr-score-category {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 25px;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.dmr-category-low.dmr-score-category {
    background: #46b450;
}

.dmr-category-moderate.dmr-score-category {
    background: #ffb900;
}

.dmr-category-high.dmr-score-category {
    background: #dc3232;
}

.dmr-results-recommendation {
    padding: 30px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
}

.dmr-results-recommendation h3 {
    margin-top: 1.25em;
    margin-bottom: 0.5em;
    color: #333;
    font-size: 1.05rem;
}

.dmr-results-recommendation h3:first-of-type {
    margin-top: 0;
}

.dmr-results-recommendation ul {
    margin: 0 0 0.5em 1.25em;
    padding: 0;
}

.dmr-results-recommendation li {
    margin-bottom: 0.35em;
    line-height: 1.5;
}

.dmr-results-footer {
    text-align: center;
    color: #666;
    margin-top: 30px;
}

/* Review Section Styles */
.dmr-review-summary {
    margin-bottom: 30px;
}

.dmr-review-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dmr-review-section h4 {
    color: #256e29;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8f5e9;
}

.dmr-review-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dmr-review-info p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.dmr-review-info strong {
    color: #1a1a1a;
    min-width: 140px;
    display: inline-block;
}

.dmr-review-questions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dmr-review-question-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dmr-review-question-item:hover {
    background: #f0f4f1;
    box-shadow: 0 2px 6px rgba(37, 110, 41, 0.1);
}

.dmr-review-question-number {
    font-weight: 700;
    color: #256e29;
    font-size: 1.1rem;
    min-width: 30px;
    flex-shrink: 0;
}

.dmr-review-question-content {
    flex: 1;
}

.dmr-review-question-text {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.6;
    font-size: 1rem;
}

.dmr-review-answer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.dmr-review-answer-label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.dmr-review-answer-value {
    color: #256e29;
    font-weight: 700;
    font-size: 1rem;
    padding: 4px 12px;
    background: rgba(37, 110, 41, 0.1);
    border-radius: 6px;
}

.dmr-review-score-box {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-radius: 12px;
    border: 2px solid #256e29;
}

.dmr-review-score-number {
    font-size: 56px;
    font-weight: 800;
    color: #256e29;
    line-height: 1;
    margin-bottom: 5px;
}

.dmr-review-score-total {
    font-size: 24px;
    color: #666;
    margin-bottom: 15px;
}

.dmr-review-category {
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 10px;
}

.dmr-category-low {
    background: #46b450;
}

.dmr-category-moderate {
    background: #ffb900;
}

.dmr-category-high {
    background: #dc3232;
}

.dmr-loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Loading State Styles */
.dmr-submit-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.dmr-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e8f5e9;
    border-top-color: #256e29;
    border-radius: 50%;
    animation: dmr-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes dmr-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dmr-loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #256e29;
    margin: 0;
}

.dmr-btn-loading {
    display: inline-block;
}

.dmr-submit-success {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #256e29;
    color: white;
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(37, 110, 41, 0.3);
    z-index: 1001;
    text-align: center;
}

.dmr-submit-success p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .dmr-scale-legend {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
    }
    
    .dmr-scale-legend span {
        flex: 0 0 45%;
    }
    
    .dmr-question {
        padding: 20px;
    }
    
    .dmr-options {
        gap: 12px;
    }
    
    .dmr-radio-label {
        padding: 8px;
    }
    
    .dmr-radio-text {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .dmr-self-check-wrapper {
        padding: 10px;
    }
    
    .dmr-form {
        padding: 20px 15px;
    }
    
    .dmr-question {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .dmr-question legend {
        font-size: 0.95rem;
    }
    
    .dmr-scale-legend {
        font-size: 11px;
        padding: 15px;
    }
    
    .dmr-scale-legend strong {
        font-size: 14px;
    }
    
    .dmr-options {
        gap: 8px;
    }
    
    .dmr-radio-label {
        padding: 6px;
    }
    
    .dmr-radio-label input[type="radio"] {
        width: 18px;
        height: 18px;
    }
    
    .dmr-radio-text {
        font-size: 16px;
    }
    
    .dmr-nav-buttons {
        flex-direction: column;
    }
    
    .dmr-btn {
        width: 100%;
    }
    
    /* Review Section Mobile */
    .dmr-review-section {
        padding: 15px;
    }
    
    .dmr-review-section h4 {
        font-size: 1.1rem;
    }
    
    .dmr-review-question-item {
        flex-direction: column;
        padding: 15px;
        gap: 10px;
    }
    
    .dmr-review-question-number {
        min-width: auto;
    }
    
    .dmr-review-answer {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .dmr-review-score-number {
        font-size: 42px;
    }
    
    .dmr-review-score-total {
        font-size: 20px;
    }
    
    .dmr-review-category {
        font-size: 1rem;
        padding: 8px 20px;
    }
}

/* Self-check modal (trigger: #dmr-take-self-check) — Poppins + plugin greens */
html.dmr-self-check-modal-active {
    overflow: hidden;
}

.dmr-self-check-modal,
.dmr-self-check-modal * {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dmr-self-check-embed-body .dmr-self-check-wrapper {
    margin-top: 16px;
    margin-bottom: 16px;
}

.dmr-self-check-embed-body,
.dmr-self-check-embed-body .dmr-self-check-wrapper,
.dmr-self-check-embed-body .dmr-form {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dmr-self-check-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.dmr-self-check-modal--open {
    opacity: 1;
    visibility: visible;
}

.dmr-self-check-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.dmr-self-check-modal__dialog {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.dmr-self-check-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: #e9f5e9;
    flex-shrink: 0;
}

.dmr-self-check-modal__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.01em;
}

.dmr-self-check-modal__close {
    flex-shrink: 0;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #000;
    cursor: pointer;
    border-radius: 6px;
}

.dmr-self-check-modal__close:hover {
    background: rgba(37, 110, 41, 0.12);
    color: #1a4f1e;
}

.dmr-self-check-modal__body {
    flex: 1;
    min-height: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Crossfade / slide handoff: intro → assessment (keyframes + !important survive theme transition: none) */
@keyframes dmr-swap-intro-out {
    from {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
    to {
        opacity: 0;
        transform: translate3d(0, -14px, 0);
    }
}

@keyframes dmr-swap-assessment-in {
    from {
        opacity: 0;
        transform: translate3d(0, 18px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.dmr-self-check-modal--swapping-to-assessment .dmr-self-check-modal__intro,
.dmr-self-check-modal--swapping-to-assessment .dmr-self-check-modal__assessment {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
}

.dmr-self-check-modal--swapping-to-assessment .dmr-self-check-modal__intro {
    z-index: 1 !important;
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
    animation: none !important;
    will-change: opacity, transform;
}

.dmr-self-check-modal--swapping-to-assessment .dmr-self-check-modal__assessment {
    z-index: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    opacity: 0 !important;
    transform: translate3d(0, 18px, 0) !important;
    animation: none !important;
    background: #f7f7f7 !important;
    will-change: opacity, transform;
}

.dmr-self-check-modal--swapping-to-assessment.dmr-self-check-modal--swap-reveal .dmr-self-check-modal__intro {
    animation: dmr-swap-intro-out 0.42s cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
}

.dmr-self-check-modal--swapping-to-assessment.dmr-self-check-modal--swap-reveal .dmr-self-check-modal__assessment {
    animation: dmr-swap-assessment-in 0.48s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both !important;
}

@media (prefers-reduced-motion: reduce) {
    .dmr-self-check-modal--swapping-to-assessment.dmr-self-check-modal--swap-reveal .dmr-self-check-modal__intro {
        animation: none !important;
        opacity: 0 !important;
        transform: translate3d(0, 0, 0) !important;
    }

    .dmr-self-check-modal--swapping-to-assessment.dmr-self-check-modal--swap-reveal .dmr-self-check-modal__assessment {
        animation: none !important;
        opacity: 1 !important;
        transform: translate3d(0, 0, 0) !important;
    }
}

/* Hide intro when assessment is open (themes often break native [hidden]) */
.dmr-self-check-modal--assessment .dmr-self-check-modal__intro {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    border: none !important;
}

#dmr-self-check-intro[hidden] {
    display: none !important;
}

.dmr-self-check-modal__intro {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 36px 28px 40px;
    box-sizing: border-box;
    transition: opacity 0.34s ease, transform 0.34s ease;
}

.dmr-self-check-modal__intro-text {
    margin: 0 0 32px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.55;
    color: #000;
    max-width: 22em;
}

.dmr-self-check-modal__intro--loading .dmr-self-check-modal__intro-text {
    opacity: 0.65;
}

.dmr-self-check-modal__intro--loading .dmr-self-check-modal__btn--primary:disabled {
    cursor: wait;
    opacity: 0.95;
}

.dmr-self-check-modal__intro--loading .dmr-self-check-modal__btn--secondary:disabled,
.dmr-self-check-modal [data-dmr-modal-skip]:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.dmr-self-check-modal__close:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    pointer-events: none;
}

.dmr-self-check-modal__intro--submitted-today .dmr-self-check-modal__actions {
    display: none !important;
}

/* Instant hide of intro copy/buttons while iframe handoff runs (avoids flash of full intro). */
.dmr-self-check-modal__intro--handoff .dmr-self-check-modal__intro-text,
.dmr-self-check-modal__intro--handoff .dmr-self-check-modal__actions {
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    pointer-events: none !important;
    white-space: nowrap !important;
}

.dmr-self-check-modal__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dmr-self-check-modal__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 999px;
    border-style: solid;
    border-width: 2px;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dmr-self-check-modal__btn--primary {
    background-color: #256e29;
    color: #fff;
    border-color: #256e29;
    box-shadow: none;
}

.dmr-self-check-modal__btn--primary:hover {
    background-color: transparent;
    background-image: none;
    color: #256e29;
    border-color: #256e29;
    box-shadow: none;
}

.dmr-self-check-modal__btn--secondary {
    background-color: transparent;
    color: #256e29;
    font-weight: 600;
    border-color: #256e29;
    box-shadow: none;
}

.dmr-self-check-modal__btn--secondary:hover {
    background-color: #256e29;
    color: #fff;
    border-color: #256e29;
}

.dmr-self-check-modal__assessment {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #f7f7f7;
    transition: opacity 0.36s ease, transform 0.36s ease;
}

.dmr-self-check-modal--assessment .dmr-self-check-modal__assessment {
    position: relative;
    opacity: 1;
    transform: none;
}

.dmr-self-check-modal__iframe {
    display: block;
    width: 100%;
    flex: 1;
    min-height: 0;
    height: 100%;
    border: 0;
    background: #fff;
}

@media (max-width: 480px) {
    .dmr-self-check-modal__intro {
        padding: 28px 20px 32px;
    }

    .dmr-self-check-modal__actions {
        flex-direction: column;
        width: 100%;
    }

    .dmr-self-check-modal__btn {
        width: 100%;
    }
}