/* WasteZero API Connector Styles - BEM Methodology */

/* Container */
.wzc {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 160px;
    width: 100%;
}

/* Form Text Input */
input[type=email].wzc-form-text,
input[type=text].wzc-form-text {
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    outline: none;
}

input[type=email].wzc-form-text:focus,
input[type=text].wzc-form-text:focus {
    border-color: #2cbc63;
}

/* Intro */
.wzc-intro {
    background: white;
    border: 3px solid #2cbc63;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 30px;
    text-align: center;
}

.wzc-intro__main {
    margin: 0 0 10px 0;
    font-size: 20px;
    line-height: 1.4;
    color: #333;
    font-weight: 400;
}

.wzc-intro__sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Autocomplete Block */
.wzc-autocomplete {
    margin-top: 30px;
}

.wzc-autocomplete__wrapper {
    position: relative;
    width: 100%;
}

.wzc-autocomplete__input {
    width: 100%;
    box-sizing: border-box;
}

.wzc-autocomplete__results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.wzc-autocomplete__message {
    padding: 10px;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

/* Divider */
.wzc-divider {
    position: relative;
    text-align: center;
    padding: 30px 0;
}

.wzc-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.wzc-divider__text {
    position: relative;
    display: inline-block;
    padding: 0 20px;
    background: white;
    color: #666;
    font-weight: 600;
    font-size: 14px;
}

/* Lookup Block */
.wzc-lookup__form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.wzc-lookup__input {
    flex: 1;
    box-sizing: border-box;
}

.wzc-lookup__button {
    padding: 16px 32px;
    background: #2cbc63;
    color: white;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.wzc-lookup__button:hover {
    background: #25a054;
}

.wzc-lookup__spinner {
    display: none;
    margin-left: 10px;
}

/* Payment Section */
.wzc-payment-section {
    background: #f5f5f5;
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
    display: none;
}

.wzc-payment-section--visible {
    display: block;
}

.wzc-payment-section__result {
    margin-bottom: 20px;
}

/* Result Box */
.wzc-result-box {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
}

.wzc-result-box--no-payment {
    border-color: #2cbc63;
    background: #f0fdf4;
}

.wzc-result-box__message {
    flex: 0 0 auto;
    font-size: 16px;
    color: #2cbc63;
}

.wzc-result-box__pricing {
    flex: 0 0 auto;
}

.wzc-result-box__price-item {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.wzc-result-box__price-item:last-child {
    margin-bottom: 0;
}

.wzc-result-box__address {
    flex: 1;
    text-align: right;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Payment Section Info */
.wzc-payment-section__info {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wzc-payment-section__info-item {
    margin: 0 0 15px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.wzc-payment-section__info-item:last-child {
    margin-bottom: 0;
}

.wzc-payment-section__info-item--muted {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.wzc-payment-section__info-item a {
    color: #0073aa;
    text-decoration: none;
}

.wzc-payment-section__info-item a:hover {
    text-decoration: underline;
}

/* Payment Form */
.wzc-payment-form__heading {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.wzc-payment-form__row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.wzc-payment-form__field {
    flex: 1;
}

.wzc-payment-form__disclaimer {
    margin: 0 0 20px 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
    line-height: 1.6;
}

.wzc-payment-form__info {
    margin: 20px 0 15px 0;
}

.wzc-payment-form__info-item {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.wzc-payment-form__info-item:last-child {
    margin-bottom: 0;
}

.wzc-payment-form__info-item a {
    color: #0073aa;
    text-decoration: none;
}

.wzc-payment-form__info-item a:hover {
    text-decoration: underline;
}

input[type="submit"].wzc-payment-form__submit {
    margin-top: 15px;
    padding: 16px 32px;
    background: #2cbc63;
    color: white;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    width: 100%;
}

.wzc-payment-form__submit:hover {
    background: #25a054;
}

.wzc-payment-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wzc-payment-form__submit:disabled:hover {
    background: #2cbc63;
}

/* Success Message */
.wzc-success-message {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}

.wzc-success-message__heading {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 600;
    color: #2cbc63;
    line-height: 1.3;
}

.wzc-success-message__text {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

.wzc-success-message__text:last-child {
    margin-bottom: 0;
}

.wzc-success-message__text a {
    color: #0073aa;
    text-decoration: none;
}

.wzc-success-message__text a:hover {
    text-decoration: underline;
}

#qp-embedded-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    height: 130px !important;
}

/* Mobile Responsive Styles */
@media (max-width: 640px) {
    /* Stack lookup form on mobile */
    .wzc-lookup__form {
        flex-direction: column;
    }

    .wzc-lookup__input {
        width: 100%;
    }

    .wzc-lookup__button {
        width: 100%;
    }

    .wzc-payment-section {
        padding: 20px;
    }

    /* Stack payment form fields on mobile */
    .wzc-payment-form__row {
        flex-direction: column;
        gap: 15px;
    }

    /* Stack result box pricing and address on mobile */
    .wzc-result-box {
        flex-direction: column;
        gap: 15px;
    }

    .wzc-result-box__address {
        text-align: left;
    }

    /* Adjust success message heading on mobile */
    .wzc-success-message__heading {
        font-size: 24px;
    }

    .wzc-success-message {
        padding: 20px;
    }

    #qp-embedded-container {
        min-height: 145px !important;
    }
}

@media (max-width: 456px) {
    #qp-embedded-container {
        min-height: 195px !important;
    }
}