.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mg-speed-match {
    padding: 0 0 3rem;
}

.mg-speed-match__card {
    padding: clamp(1.25rem, 2.5vw, 2rem);
    border-radius: 20px;
    background: var(--mg-accent);
    color: #fff;
}

.mg-speed-match__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.mg-speed-match__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
}

.mg-speed-match__subtitle {
    margin: 0;
    max-width: 42rem;
    font-size: 0.875rem;
    line-height: 1.35;
    color: #fff;
}

.mg-speed-match__subtitle strong {
    font-weight: 700;
}

.mg-speed-match__form {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.75rem;
}

.mg-speed-match__field {
    flex: 1 1 180px;
    min-width: 0;
}

.mg-speed-match__field--wide {
    flex: 1 1 280px;
}

.mg-speed-match__field input,
.mg-speed-match__select {
    width: 100%;
    height: 50px;
    padding: 0 1.125rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 65px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font: inherit;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.mg-speed-match__field input::placeholder {
    color: rgba(255, 255, 255, 0.92);
}

.mg-speed-match__field input:focus,
.mg-speed-match__select:focus {
    outline: none;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.22);
}

.mg-speed-match__select {
    appearance: none;
    background-color: rgba(255, 255, 255, 0.14);
    background-image: linear-gradient(45deg, transparent 50%, #fff 50%),
        linear-gradient(135deg, #fff 50%, transparent 50%);
    background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 2rem;
    color: rgba(255, 255, 255, 0.92);
}

.mg-speed-match__select:valid,
.mg-speed-match__select:focus {
    color: #fff;
}

.mg-speed-match__select option {
    color: #171717;
    background: #fff;
}

.mg-speed-match__submit {
    flex: 0 0 auto;
    min-width: 155px;
    height: 50px;
    padding: 0 1.25rem;
    border: 0;
    border-radius: 65px;
    background: #fff;
    color: #171717;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.mg-speed-match__submit:hover {
    opacity: 0.92;
}

@media (max-width: 991px) {
    .mg-speed-match__field,
    .mg-speed-match__field--wide {
        flex: 1 1 calc(50% - 0.375rem);
    }

    .mg-speed-match__submit {
        flex: 1 1 100%;
        width: 100%;
    }
}

@media (max-width: 639px) {
    .mg-speed-match__field,
    .mg-speed-match__field--wide {
        flex: 1 1 100%;
    }
}
