/**
 * UniqueCloud Finder shortcode styles.
 * Inspired by the green pill bar shown in the reference design.
 */

.cc-unique-finder {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 18px 40px;
    background: #124734;
    border-radius: 999px;
    color: #fff;
    font-family: inherit;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
    width: 100%;
}

.cc-unique-finder * {
    box-sizing: border-box;
}

.cc-finder-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 180px;
    min-width: 0;
    gap: 4px;
}

.cc-finder-field--submit {
    flex: 0 0 auto;
}

.cc-finder-label {
    font-size: 12px;
    text-transform: none;
    opacity: 0.9;
    letter-spacing: 0.2px;
    color: #d8e6dd;
    font-weight: 500;
    margin: 0;
}

.cc-finder-select {
    width: 100%;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 4px 26px 4px 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='white' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 4px center;
    cursor: pointer;
    line-height: 1.2;
    border-radius: 0;
    box-shadow: none;
    height: auto;
}

.cc-finder-select:focus {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

.cc-finder-select option {
    color: #20533c;
    background: #fff;
}

.cc-finder-counter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cc-finder-counter__btn {
    width: 30px;
    height: 26px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.65);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cc-finder-counter__btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

.cc-finder-counter__btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
    outline-offset: 1px;
    background: #852E2C;
}

.cc-finder-counter__value {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    width: 36px;
    text-align: center;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
    pointer-events: none;
}

.cc-finder-counter__value::-webkit-outer-spin-button,
.cc-finder-counter__value::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cc-finder-submit {
    background: #852E2C;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 14px 22px;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
    line-height: 1.1;
    white-space: nowrap;
}

.cc-finder-submit:hover {
    background: #962020;
}

.cc-finder-submit:active {
    transform: translateY(1px);
}

.cc-finder-submit:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.cc-finder-error {
    flex-basis: 100%;
    margin: 0;
    color: #ffd7d7;
    font-size: 13px;
    min-height: 0;
}

.cc-finder-error:not(:empty) {
    margin-top: 6px;
    min-height: 18px;
}

/* Tablet & smaller: stack as a card */
@media (max-width: 900px) {
    .cc-unique-finder {
        border-radius: 18px;
        gap: 14px;
        padding: 18px;
    }

    .cc-finder-field {
        flex-basis: 45%;
    }

    .cc-finder-field--submit {
        flex-basis: 100%;
    }

    .cc-finder-submit {
        width: 100%;
    }
}

@media (max-width: 540px) {
    .cc-unique-finder {
        flex-direction: column;
        align-items: stretch;
        border-radius: 14px;
    }

    .cc-finder-field {
        flex-basis: auto;
    }

    .cc-finder-counter {
        justify-content: space-between;
    }
}
