/* ADC Postcode Checker — Front-end Widget */

.adc-checker-wrap {
    max-width: 540px;
    margin: 0 auto 2rem;
    font-family: inherit;
}

/* Intro */
.adc-checker-intro {
    margin-bottom: 1.25rem;
}

.adc-checker-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    color: #1a1a1a;
}

.adc-checker-subtitle {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* Input row */
.adc-input-row {
    display: flex;
    gap: 0;
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}

.adc-input-row:focus-within {
    border-color: #2563eb;
}

.adc-postcode-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: #1a1a1a;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.adc-postcode-input::placeholder {
    text-transform: none;
    color: #999;
    letter-spacing: 0;
}

.adc-check-btn {
    border: none;
    background: #1a1a1a;
    color: #fff;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.adc-check-btn:hover {
    background: #2563eb;
}

.adc-check-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Inline error */
.adc-inline-error {
    color: #b91c1c;
    font-size: 0.88rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: #fef2f2;
    border-radius: 4px;
    border-left: 3px solid #b91c1c;
}

/* Result panel */
.adc-result {
    margin-top: 1.25rem;
}

/* Covered */
.adc-result-covered {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.25rem 1rem;
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 8px;
    align-items: flex-start;
}

.adc-result-tick {
    font-size: 1.4rem;
    color: #16a34a;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Not covered */
.adc-result-not-covered {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.25rem 1rem;
    background: #fef2f2;
    border: 1.5px solid #fca5a5;
    border-radius: 8px;
    align-items: flex-start;
}

.adc-result-cross {
    font-size: 1.4rem;
    color: #dc2626;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Result body */
.adc-result-body {
    flex: 1;
}

.adc-result-headline {
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 0.75rem;
    color: #1a1a1a;
}

.adc-result-sub {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 1rem;
    line-height: 1.5;
}

/* Detail rows */
.adc-result-detail {
    margin-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.adc-detail-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.adc-detail-label {
    color: #555;
    min-width: 130px;
    flex-shrink: 0;
}

.adc-detail-value {
    font-weight: 600;
    color: #1a1a1a;
}

/* Charge info */
.adc-result-free,
.adc-result-charge,
.adc-result-min {
    font-size: 0.9rem;
    margin: 0.3rem 0;
    color: #1a1a1a;
}

.adc-result-free {
    color: #16a34a;
}

/* Book button */
.adc-book-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.25rem;
    background: #1a1a1a;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background 0.15s;
    letter-spacing: 0.02em;
}

.adc-book-btn:hover {
    background: #2563eb;
    color: #fff !important;
}

/* Contact options */
.adc-contact-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.adc-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.15s;
}

.adc-contact-phone {
    background: #1a1a1a;
    color: #fff !important;
}

.adc-contact-link {
    background: transparent;
    border: 1.5px solid #1a1a1a;
    color: #1a1a1a !important;
}

.adc-contact-btn:hover {
    opacity: 0.8;
}

/* Loading state */
.adc-check-btn.adc-loading {
    position: relative;
    color: transparent;
}

.adc-check-btn.adc-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: adc-spin 0.6s linear infinite;
}

@keyframes adc-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Mobile */
@media (max-width: 480px) {
    .adc-detail-row {
        flex-direction: column;
        gap: 0.1rem;
    }
    .adc-detail-label {
        min-width: auto;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #777;
    }
}

/* Mobile fixes */
@media (max-width: 600px) {
    .adc-checker-wrap {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .adc-input-row {
        width: 100%;
        box-sizing: border-box;
    }

    .adc-postcode-input {
        min-width: 0;
        width: 100%;
    }

    .adc-check-btn {
        flex-shrink: 0;
        padding: 0 1.1rem;
    }

    .adc-result-covered,
    .adc-result-not-covered {
        flex-direction: column;
        gap: 0.5rem;
    }

    .adc-result-tick,
    .adc-result-cross {
        font-size: 1.2rem;
    }

    .adc-book-btn {
        display: block;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .adc-contact-options {
        flex-direction: column;
    }

    .adc-contact-btn {
        justify-content: center;
    }
}

/* Constrain input and result width on mobile */
@media (max-width: 600px) {
    .adc-checker-wrap {
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 1rem;
    }

    .adc-input-row {
        max-width: 480px;
    }

    .adc-result {
        max-width: 480px;
    }
}
