/* =========================================================
   Open RIF  Keyboard Checker
   ========================================================= */

.or-checker {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.or-checker-header {
    max-width: 700px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.or-eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;

    color: #00afff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.or-checker-header h1 {
    margin: 0 0 1rem;

    color: #222;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.05;
    font-weight: 800;
}

.or-checker-header p {
    max-width: 620px;
    margin: 0 auto;

    color: #666;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ---------------------------------------------------------
   Main card
   --------------------------------------------------------- */

.or-checker-card {
    max-width: 720px;
    margin: 0 auto;
    padding: clamp(1.25rem, 4vw, 2.5rem);

    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 16px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.or-checker-card label {
    display: block;
    margin-bottom: 0.4rem;

    color: #222;
    font-size: 1rem;
    font-weight: 700;
}

.or-help {
    margin: 0 0 1rem;

    color: #777;
    font-size: 0.9rem;
}

/* ---------------------------------------------------------
   Text input
   --------------------------------------------------------- */

#keyboard-input {
    display: block;

    width: 100%;
    min-height: 160px;
    box-sizing: border-box;

    padding: 1rem 1.1rem;

    resize: vertical;

    background: #fafafa;
    border: 1px solid #d9d9d9;
    border-radius: 10px;

    color: #222;

    font-family: inherit;
    font-size: 1.1rem;
    line-height: 1.7;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

#keyboard-input::placeholder {
    color: #999;
}

#keyboard-input:focus {
    background: #fff;
    border-color: #00afff;

    box-shadow: 0 0 0 3px rgba(0, 175, 255, 0.15);
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.or-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;

    margin-top: 1rem;
}

.or-button {
    appearance: none;

    border: 0;
    border-radius: 8px;

    padding: 0.75rem 1.2rem;

    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease,
        background 0.15s ease;
}

.or-button:hover {
    transform: translateY(-1px);
}

.or-button:active {
    transform: translateY(0);
}

/* Primary Open RIF blue */

.or-button-primary {
    background: #00afff;
    color: #fff;
}

.or-button-primary:hover {
    opacity: 0.9;
}

/* Neutral secondary button */

.or-button-secondary {
    background: #eeeeee;
    color: #333;
}

.or-button-secondary:hover {
    background: #e2e2e2;
}

/* ---------------------------------------------------------
   Result
   --------------------------------------------------------- */

.or-result {
    display: flex;
    gap: 1rem;

    margin-top: 1.5rem;
    padding: 1rem 1.1rem;

    border-radius: 10px;

    animation: or-result-in 0.2s ease;
}

/* Correct */

.or-result.valid {
    background: #f0fff4;
    border: 1px solid #9fddb4;
}

.or-result.valid .or-result-icon {
    background: #22a447;
    color: #fff;
}

/* Wrong */

.or-result.invalid {
    background: #fff4f4;
    border: 1px solid #e5aaaa;
}

.or-result.invalid .or-result-icon {
    background: #d93025;
    color: #fff;
}

/* Result icon */

.or-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    border-radius: 50%;

    font-size: 1rem;
    font-weight: 800;
}

.or-result-content {
    min-width: 0;
}

.or-result h2 {
    margin: 0 0 0.25rem;

    color: #222;
    font-size: 1rem;
}

.or-result p {
    margin: 0;

    color: #555;
}

/* ---------------------------------------------------------
   Invalid characters
   --------------------------------------------------------- */

.or-invalid-list {
    display: grid;
    gap: 0.5rem;

    margin-top: 1rem;
}

.or-invalid-character {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    padding: 0.65rem 0.75rem;

    background: #fff;
    border: 1px solid #efcaca;
    border-radius: 8px;
}

.or-invalid-character-symbol {
    color: #d93025;

    font-size: 1.15rem;
    font-weight: 700;
}

.or-invalid-character-code {
    color: #777;

    font-family: monospace;
    font-size: 0.8rem;
}

/* ---------------------------------------------------------
   Information
   --------------------------------------------------------- */

.or-checker-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;

    max-width: 720px;
    margin: 2rem auto 0;
}

.or-checker-info > div {
    padding: 1.25rem;

    border-top: 2px solid #e5e5e5;
}

.or-checker-info strong {
    display: block;
    margin-bottom: 0.5rem;

    color: #222;
}

.or-checker-info p {
    margin: 0;

    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ---------------------------------------------------------
   Animation
   --------------------------------------------------------- */

@keyframes or-result-in {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------------------------------------------------
   Mobile
   --------------------------------------------------------- */

@media (max-width: 600px) {

    .or-checker {
        padding-right: 0.75rem;
        padding-left: 0.75rem;
    }

    .or-actions {
        flex-direction: column;
    }

    .or-button {
        width: 100%;
    }

    .or-checker-info {
        grid-template-columns: 1fr;
    }

    .or-invalid-character {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
}
