/* APM Frontend Lookup Styles */

.apm-lookup-form {
    box-sizing: border-box;
    font-family: inherit;
}

.apm-lookup-form * {
    box-sizing: border-box;
}

.apm-lookup-form form {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
}

.apm-input-wrapper {
    position: relative;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.apm-postcode-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apm-postcode-icon svg {
    width: 100%;
    height: 100%;
}

.apm-lookup-form input[type="text"] {
    width: 100%;
    border: 1px solid #ddd;
    background: #fff;
    color: #074727;
    margin: 0;
    border-radius: 0;
    /* Reset */
}

.apm-lookup-form input[type="text"]::placeholder {
    color: rgba(0, 0, 0, 0.5);
    opacity: 1;
    /* Firefox */
}

.apm-lookup-form button {
    background-color: #064727;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background-color 0.2s;
    border-radius: 0;
    /* Reset */
    display: flex;
    align-items: center;
    justify-content: center;
}

.apm-lookup-form button:hover:not(:disabled) {
    background-color: #04331b;
}

.apm-lookup-form button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Sizes */

/* Small Variant */
.apm-lookup-small input[type="text"] {
    height: 48px;
    padding: 0 15px 0 45px;
    /* Left padding for icon */
    font-size: 16px;
}

.apm-lookup-small button {
    height: 48px;
    padding: 0 25px;
    font-size: 16px;
}

/* Big Variant */
.apm-lookup-big input[type="text"] {
    height: 64px;
    padding: 0 20px 0 55px;
    /* Left padding for icon */
    font-size: 18px;
}

.apm-lookup-big button {
    height: 64px;
    padding: 0 40px;
    font-size: 18px;
}

.apm-lookup-big .apm-postcode-icon {
    left: 20px;
    width: 28px;
    height: 28px;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .apm-lookup-form form {
        flex-direction: column;
    }

    .apm-input-wrapper {
        width: 100%;
    }

    .apm-lookup-form button {
        width: 100%;
        margin-top: 0;
        /* Stacked directly? Or with gap? */
    }

    /* If stacked, we might want a small border between them if they touch, or a gap. 
       The image description implies "Mobile" layout has button below. 
       Usually this implies a gap or just stacked blocks. 
       Let's assume they touch or have a small gap. 
       Given "attached" look on desktop, maybe separate blocks on mobile. */

    /* Let's add a small gap for mobile */
    .apm-lookup-form form {
        gap: 0;
        /* If we want them attached on desktop, gap 0. On mobile? */
    }

    /* Actually, let's look at the image description again. 
       "Make it mobile responsive." 
       Usually input and button are full width on mobile. */

    .apm-lookup-form button {
        margin-top: 0;
    }
}

/* Desktop specific adjustments for attached look */
@media (min-width: 601px) {
    .apm-lookup-form input[type="text"] {
        border-right: none;
    }
}

/* Error Message */
.apm-error {
    color: #d63638;
    margin-top: 10px;
    font-size: 14px;
}