/* ==========================================================================
   DZOO Kaiser Steps Challenge — Form Block Styles
   ========================================================================== */

.dksc-form-block {
    margin: 1em auto;
    font-family: 'GT Ultra', sans-serif;
}

/* Screen reader only */
.dksc-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Honeypot — hidden from real users */
.dksc-hp {
    position: absolute;
    left: -9999px;
    top: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ==========================================================================
   Spinner
   ========================================================================== */

.dksc-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(37, 121, 36, 0.3);
    border-top-color: #257924;
    border-radius: 50%;
    animation: dksc-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 0.5em;
}

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

/* ==========================================================================
   Form Section
   ========================================================================== */

.dksc-form-section {
    padding: 0;
}

.dksc-form-title {
    margin: 0 0 1.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #257924;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dksc-form-group {
    margin-bottom: 1.25rem;
}

.dksc-form-row {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.dksc-form-row > .dksc-form-group {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.dksc-label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 600;
    color: var(--dksc-form-label-color, #333);
    font-size: 0.95rem;
}

.dksc-required {
    color: #ffffff;
}

.dksc-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 0;
    font-size: 1rem;
    color: #333;
    background: #fff;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.dksc-input:focus {
    outline: none;
    border-color: var(--dksc-form-btn-bg, #257924);
    box-shadow: 0 0 0 3px rgba(37, 121, 36, 0.15);
}

.dksc-input:hover {
    border-color: var(--dksc-form-btn-bg, #257924);
}

.dksc-form-block .dksc-field-description {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    color: var(--dksc-form-label-color, #888);
}

.dksc-field-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--dksc-form-btn-bg, #257924);
    font-weight: 600;
    min-height: 1.2em;
}

/* Consent */
.dksc-consent-group {
    padding: 1rem;
    border-radius: 8px;
}

.dksc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--dksc-form-label-color, #333);
}

.dksc-checkbox {
    margin-top: 0.2em;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.dksc-consent-text {
    flex: 1;
}

/* Submit Button */
.dksc-form-actions {
    margin-top: 1.5rem;
}

.dksc-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 29px;
    background: var(--dksc-form-btn-bg, #257924);
    color: var(--dksc-form-btn-text, #fff);
    border: none;
    border-radius: 0;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 170px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.dksc-submit-btn:hover {
    filter: brightness(1.2);
    transform: translateY(-1px);
}

.dksc-submit-btn:active {
    transform: translateY(0);
}

.dksc-submit-btn:focus-visible {
    outline: 2px solid var(--dksc-form-btn-bg, #257924);
    outline-offset: 2px;
}

.dksc-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Form Error */
.dksc-form-error {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    color: var(--dksc-form-btn-bg, #257924);
    border-radius: 8px;
    font-weight: 600;
    border-left: 3px solid var(--dksc-form-btn-bg, #257924);
}

/* ==========================================================================
   Feedback Section
   ========================================================================== */

.dksc-feedback {
    outline: none;
}


.dksc-feedback-card {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.dksc-feedback-title {
    margin: 0 0 1.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #257924;
    text-transform: uppercase;
}
.dksc-feedback-intro {
    max-width: 950px;
    margin: auto;
    margin-bottom: 20px;
}

.dksc-feedback-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.dksc-stat {
    text-align: center;
}

.dksc-stat-label {
    display: block;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.dksc-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dksc-form-btn-bg, #257924);
}

/* Cap Notice */
.dksc-feedback-cap-notice {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ffc107;
    color: #856404;
    font-size: 0.9rem;
    text-align: left;
}

.dksc-feedback-cap-notice p {
    margin: 0;
}

/* Badges */
.dksc-feedback-badges,
.dksc-feedback-all-badges {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.dksc-badges-title,
.dksc-all-badges-title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #257924;
    text-transform: uppercase;
    font-family: inherit;
}

.dksc-new-badges,
.dksc-all-badges-list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dksc-badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid var(--dksc-form-btn-bg, #257924);
    border-radius: 8px;
    min-width: 80px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.dksc-badge-item:hover {
    transform: translateY(-2px);
}

.dksc-badge-new {
    border-color: var(--dksc-form-btn-bg, #257924);
    box-shadow: 0 0 0 2px rgba(37, 121, 36, 0.2);
    animation: dksc-badge-pop 0.4s ease;
}

@keyframes dksc-badge-pop {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.dksc-badge-img-link {
    display: block;
    line-height: 0;
}

.dksc-badge-img {
    width: 250px;
    height: 250px;
    object-fit: contain;
}

.dksc-badge-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    text-align: center;
    line-height: 1.2;
}

.dksc-badge-earned-date {
    font-size: 0.7rem;
    color: #999;
    text-align: center;
    line-height: 1.2;
}

.dksc-badge-download-inline {
    display: inline-block;
    margin-top: 0.375rem;
    padding: 0.375rem 0.875rem;
    background: #00B8DD;
    color: #000;
    border: none;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: filter 0.2s ease;
}

.dksc-badge-download-inline:hover {
    filter: brightness(1.1);
    color: #000;
}

/* ==========================================================================
   Badge Modal
   ========================================================================== */

.dksc-badge-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dksc-badge-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    animation: dksc-fade-in 0.2s ease;
}

.dksc-badge-modal-content {
    position: relative;
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 90%;
    width: 450px;
    z-index: 1;
    animation: dksc-badge-pop 0.3s ease;
}

.dksc-badge-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.15s ease;
}

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

.dksc-badge-modal-close:focus-visible {
    outline: 2px solid #8ED84A;
    outline-offset: 2px;
}

.dksc-badge-modal-img {
    width: 300px;
    height: 300px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 1rem;
}

.dksc-badge-modal-name {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #257924;
}

.dksc-badge-modal-date {
    margin: 0 0 1rem;
    font-size: 0.85rem;
    color: #888;
}

.dksc-badge-modal-download {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background: #00B8DD;
    color: #000;
    border: none;
    border-radius: 0;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: filter 0.2s ease;
}

.dksc-badge-modal-download:hover {
    filter: brightness(1.1);
    color: #000;
}

.dksc-badge-modal-download:focus-visible {
    outline: 2px solid #00B8DD;
    outline-offset: 2px;
}

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

/* Submit Another Button */
.dksc-submit-another-btn {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: #00B8DD;
    color: #000;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: filter 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dksc-submit-another-btn:hover {
    filter: brightness(1.1);
}

.dksc-submit-another-btn:focus-visible {
    outline: 2px solid #00B8DD;
    outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .dksc-form-block {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .dksc-feedback-card {
        padding: 1rem;
    }

    .dksc-form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }

    .dksc-form-row > .dksc-form-group {
        margin-bottom: 1.25rem;
    }

    .dksc-feedback-stats {
        gap: 1rem;
    }

    .dksc-stat-value {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Accessibility — Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .dksc-spinner {
        animation: none;
    }

    .dksc-badge-new {
        animation: none;
    }

    .dksc-badge-item:hover,
    .dksc-submit-btn:hover {
        transform: none;
    }

    .dksc-input,
    .dksc-badge-item,
    .dksc-submit-btn,
    .dksc-badge-modal-close,
    .dksc-badge-modal-download {
        transition: none;
    }

    .dksc-badge-modal-backdrop,
    .dksc-badge-modal-content {
        animation: none;
    }
}

/* ==========================================================================
   Accessibility — High Contrast
   ========================================================================== */

@media (prefers-contrast: high) {
    .dksc-input:focus {
        outline: 3px solid #000;
        outline-offset: 2px;
    }

    .dksc-submit-btn:focus-visible,
    .dksc-submit-another-btn:focus-visible {
        outline: 3px solid #000;
        outline-offset: 2px;
    }
}
