/* Quick order form. Every rule is scoped to .ats-qo and sets its own sizes so the
   WordPress theme's form styles can't change the layout. */
.ats-qo {
    --ats-qo-green: #00743e;
    --ats-qo-dark: #144924;
    --ats-qo-gold: #d2b372;
    --ats-qo-gold-hover: #c7a660;
    --ats-qo-ink: #16261d;
    --ats-qo-muted: #5f6e66;
    --ats-qo-line: #dce3df;
    --ats-qo-tint: #eef6f1;
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    margin: 0;
    padding: 0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px -18px rgba(20, 73, 36, .45), 0 2px 6px rgba(20, 73, 36, .08);
    color: var(--ats-qo-ink);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
}

.ats-qo *,
.ats-qo *::before,
.ats-qo *::after {
    box-sizing: border-box;
}

.ats-qo [hidden] {
    display: none !important;
}

/* Header */
.ats-qo__header {
    padding: 12px 20px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(120deg, var(--ats-qo-dark), var(--ats-qo-green));
    color: #fff;
    text-align: center;
}

.ats-qo__title {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
}

.ats-qo__body {
    padding: 14px 20px 12px;
}

.ats-qo__label {
    display: block;
    margin: 0 0 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ats-qo-muted);
}

/* Certification toggle */
.ats-qo__certs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 11px;
    padding: 3px;
    border-radius: 10px;
    background: var(--ats-qo-tint);
}

.ats-qo__cert {
    position: relative;
    display: block;
    margin: 0;
    cursor: pointer;
}

.ats-qo__cert span {
    display: block;
    padding: 8px 4px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    color: var(--ats-qo-muted);
    transition: background-color .15s, color .15s;
}

.ats-qo__cert:hover span {
    color: var(--ats-qo-dark);
}

.ats-qo__cert input:checked + span {
    background: var(--ats-qo-green);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 116, 62, .3);
}

/* Inputs are hidden visually but stay reachable by keyboard and screen readers */
.ats-qo__cert input,
.ats-qo__speed input,
.ats-qo select.ats-qo__select-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

/* Language pair */
.ats-qo__langs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0 0 12px;
}

.ats-qo__field {
    min-width: 0;
}

/* Overlaps the gap between the two fields, level with their centres */
.ats-qo__arrow {
    position: absolute;
    left: 50%;
    bottom: 8px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    margin-left: -13px;
    border: 1px solid var(--ats-qo-line);
    border-radius: 50%;
    background: #fff;
    color: var(--ats-qo-green);
    pointer-events: none;
}

.ats-qo .ats-qo__picker-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 12px 0 13px;
    border: 1.5px solid var(--ats-qo-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    color: var(--ats-qo-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.ats-qo .ats-qo__picker-button:hover:not(:disabled) {
    border-color: var(--ats-qo-green);
    background: #fff;
    color: var(--ats-qo-ink);
}

.ats-qo .ats-qo__picker-button[aria-expanded="true"] {
    border-color: var(--ats-qo-green);
    box-shadow: 0 0 0 3px rgba(0, 116, 62, .14);
}

.ats-qo .ats-qo__picker-button:disabled {
    color: var(--ats-qo-muted);
    cursor: default;
}

.ats-qo__picker-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ats-qo__picker-button svg {
    flex: none;
    color: var(--ats-qo-muted);
    transition: transform .15s;
}

.ats-qo__picker-button[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* The list spans both fields so long language names fit */
.ats-qo__picker-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 50;
    padding: 8px;
    border: 1px solid var(--ats-qo-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 36px -10px rgba(20, 38, 29, .35);
}

.ats-qo .ats-qo__picker-search {
    display: block;
    width: 100%;
    height: 38px;
    margin: 0 0 6px;
    padding: 0 12px;
    border: 1.5px solid var(--ats-qo-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    color: var(--ats-qo-ink);
    font: inherit;
    font-size: 14px;
    outline: none;
}

.ats-qo .ats-qo__picker-search:focus {
    border-color: var(--ats-qo-green);
}

.ats-qo ul.ats-qo__picker-list {
    max-height: 216px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.ats-qo li.ats-qo__picker-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 14px;
    color: var(--ats-qo-ink);
    list-style: none;
    cursor: pointer;
}

.ats-qo li.ats-qo__picker-option::before {
    display: none;
}

.ats-qo li.ats-qo__picker-option.is-active {
    background: var(--ats-qo-tint);
}

.ats-qo li.ats-qo__picker-option[aria-selected="true"] {
    color: var(--ats-qo-green);
    font-weight: 700;
}

.ats-qo li.ats-qo__picker-option[aria-selected="true"]::after {
    content: "\2713";
}

.ats-qo li.ats-qo__picker-empty {
    margin: 0;
    padding: 10px;
    font-size: 13px;
    color: var(--ats-qo-muted);
    list-style: none;
}

/* Delivery speed */
.ats-qo__speeds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 0 12px;
}

.ats-qo__speed {
    position: relative;
    display: block;
    min-width: 0;
    margin: 0;
    cursor: pointer;
}

.ats-qo__speed-box {
    position: relative;
    display: block;
    height: 100%;
    padding: 6px 4px 7px;
    border: 1.5px solid var(--ats-qo-line);
    border-radius: 10px;
    background: #fff;
    text-align: center;
    transition: border-color .15s, background-color .15s;
}

.ats-qo__speed:hover .ats-qo__speed-box {
    border-color: var(--ats-qo-green);
}

.ats-qo__speed-name,
.ats-qo__speed-time,
.ats-qo__speed-price {
    display: block;
}

.ats-qo__speed-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--ats-qo-ink);
}

.ats-qo__speed-time {
    font-size: 11px;
    color: var(--ats-qo-muted);
}

.ats-qo__speed-price {
    margin-top: 3px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ats-qo-green);
    font-variant-numeric: tabular-nums;
}

.ats-qo__speed input:checked + .ats-qo__speed-box {
    border-color: var(--ats-qo-green);
    background: var(--ats-qo-tint);
    box-shadow: inset 0 0 0 .5px var(--ats-qo-green);
}

/* Tick badge on the chosen speed */
.ats-qo__speed input:checked + .ats-qo__speed-box::after {
    content: "\2713";
    position: absolute;
    top: -7px;
    right: -7px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ats-qo-green);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.ats-qo__speed input:disabled + .ats-qo__speed-box {
    border-color: var(--ats-qo-line);
    background: #f6f7f6;
    opacity: .6;
    cursor: not-allowed;
}

/* Pages and total */
.ats-qo__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 11px;
    padding: 7px 14px 8px;
    border-radius: 10px;
    background: var(--ats-qo-tint);
}

.ats-qo__summary-label {
    display: block;
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ats-qo-muted);
}

.ats-qo__stepper {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border: 1.5px solid var(--ats-qo-line);
    border-radius: 9px;
    background: #fff;
}

.ats-qo .ats-qo__stepper button {
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    color: var(--ats-qo-green);
    font: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.ats-qo .ats-qo__stepper button:hover {
    background: var(--ats-qo-tint);
    color: var(--ats-qo-dark);
}

.ats-qo .ats-qo__stepper input {
    width: 40px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--ats-qo-ink);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    -moz-appearance: textfield;
    appearance: textfield;
}

.ats-qo .ats-qo__stepper input::-webkit-outer-spin-button,
.ats-qo .ats-qo__stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.ats-qo__total {
    text-align: right;
}

.ats-qo__total-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ats-qo-dark);
    font-variant-numeric: tabular-nums;
}

.ats-qo .ats-qo__note {
    margin: 0 0 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: #fbf6ea;
    color: #5d4a1c;
    font-size: 12px;
    line-height: 1.45;
}

.ats-qo .ats-qo__note a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

/* Main button, same gold as the site's Order Now button */
.ats-qo .ats-qo__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--ats-qo-gold);
    box-shadow: 0 6px 14px -6px rgba(143, 110, 40, .7);
    color: var(--ats-qo-dark);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    transition: background-color .15s, transform .15s;
}

.ats-qo .ats-qo__submit:hover:not(:disabled) {
    background: var(--ats-qo-gold-hover);
    color: var(--ats-qo-dark);
    transform: translateY(-1px);
}

.ats-qo .ats-qo__submit:disabled {
    background: #e8e2d3;
    box-shadow: none;
    color: #7c7768;
    cursor: not-allowed;
}

.ats-qo__trust {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--ats-qo-muted);
}

.ats-qo__trust span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ats-qo .ats-qo__cert input:focus-visible + span,
.ats-qo .ats-qo__speed input:focus-visible + .ats-qo__speed-box,
.ats-qo button:focus-visible,
.ats-qo .ats-qo__stepper input:focus-visible {
    outline: 2px solid var(--ats-qo-dark);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ats-qo *,
    .ats-qo .ats-qo__submit {
        transition: none;
    }
}
