/**
 * Water Quality Checker — frontend styles.
 */

.wdwq-checker {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border: none;
    border-radius: 12px;
}

.wdwq-checker__heading {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    display: none;
}

.wdwq-checker__desc {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 24px;
    line-height: 1.4;
}

/* ─── Form ─── */

.wdwq-checker__form {
    margin-bottom: 0;
}

.wdwq-checker input[type="text"].wdwq-checker__input {
    margin-bottom: 0 !important;
}

.wdwq-checker__input-wrap {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.wdwq-checker__input {
    flex: 1;
    width: 100% !important;
    max-width: 100%;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
    text-align: center;
}

.wdwq-checker__input:focus {
    border-color: #24317C;
}

.wdwq-checker__btn {
    padding: 12px 28px;
    background: #24317C;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.wdwq-checker__btn:hover {
    background: #1a2560;
    color: #fff !important;
}

.wdwq-checker__btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ─── Results ─── */

.wdwq-checker__results {
    margin-top: 24px;
}

/* Regional notice */
.wdwq-regional-notice {
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px solid #f0dca0;
    border-radius: 6px;
    font-size: 13px;
    color: #92610a;
    margin-bottom: 12px;
}

/* Source info */
.wdwq-source {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #555;
    margin-bottom: 20px;
}

.wdwq-source strong {
    color: #333;
}

.wdwq-source a {
    color: #24317C;
    text-decoration: none;
}

.wdwq-source a:hover {
    text-decoration: underline;
}

/* Parameters grid */
.wdwq-params {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.wdwq-param {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 6px;
    font-size: 14px;
}

.wdwq-param__label {
    color: #555;
    font-weight: 500;
}

.wdwq-param__value {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.wdwq-param__unit {
    font-weight: 400;
    color: #999;
    font-size: 12px;
}

.wdwq-param__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.wdwq-param__dot--good     { background: #2E9E3E; }
.wdwq-param__dot--elevated { background: #E5A100; }
.wdwq-param__dot--high     { background: #D32F2F; }
.wdwq-param__dot--unknown  { background: #ccc; }

/* Recommendations */
.wdwq-reco-heading {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}

.wdwq-reco {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.wdwq-reco--danger  { background: #fef2f2; }
.wdwq-reco--warning { background: #fef7ed; }
.wdwq-reco--info    { background: #eff6ff; }
.wdwq-reco--success { background: #f0fdf4; }

.wdwq-reco__title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}

.wdwq-reco__message {
    color: #555;
}

/* Product cards */
.wdwq-reco-products--stacked {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.wdwq-product-card--full {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.wdwq-product-card--full:hover {
    border-color: #24317C;
}

.wdwq-product-card__image {
    flex-shrink: 0;
}

.wdwq-product-card__image img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 4px;
}

.wdwq-product-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wdwq-product-card__name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    line-height: 1.3;
}

.wdwq-product-card__price {
    font-size: 14px;
    color: #333;
}

.wdwq-product-card__price del {
    color: #999;
    font-weight: 400;
}

.wdwq-product-card__price ins {
    text-decoration: none;
    font-weight: 700;
    color: #D32F2F;
}

.wdwq-product-card__btn {
    display: inline-block;
    align-self: flex-start;
    margin-top: 4px;
    padding: 6px 16px;
    background: #24317C;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.2s ease;
}

.wdwq-product-card__btn:hover {
    background: #1a2560;
    color: #fff !important;
}

.wdwq-product-card__price .woocommerce-Price-amount {
    font-size: 14px !important;
}

.wdwq-product-card__price del .woocommerce-Price-amount {
    font-size: 13px !important;
}

.wdwq-product-card__price .price-custom__old,
.wdwq-product-card__price .price-custom__old .woocommerce-Price-amount,
.wdwq-product-card__price .price-custom .price-custom__old .woocommerce-Price-amount,
.wdwq-product-card__price .price-custom__savings {
    font-size: 12px !important;
}

.wdwq-product-card__price .price-custom {
    gap: 0 12px !important;
}

/* Error / not found */
.wdwq-error {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    color: #555;
    font-size: 15px;
}

.wdwq-error a {
    color: #24317C;
}


/* ─── Survey ─── */

.wdwq-survey {
    padding: 4px 0;
}

.wdwq-survey__intro {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px;
    line-height: 1.5;
}

.wdwq-survey__heading {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 20px;
}

.wdwq-survey__question {
    margin-bottom: 24px;
}

.wdwq-survey__label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 4px;
}

.wdwq-survey__desc {
    font-size: 13px;
    color: #888;
    margin: 0 0 10px;
    line-height: 1.4;
}

.wdwq-survey__options--multi {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wdwq-survey__options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wdwq-survey__option {
    display: block;
    cursor: pointer;
}

.wdwq-survey__option input {
    display: none;
}

.wdwq-survey__option span {
    display: block;
    padding: 10px 20px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
    text-align: center;
}

.wdwq-survey__option:hover span {
    border-color: #24317C;
    color: #24317C;
}

.wdwq-survey__option input:checked + span {
    border-color: #24317C;
    background: #24317C;
    color: #fff;
}

.wdwq-survey__error {
    color: #D32F2F;
    font-size: 13px;
    margin: 0 0 12px;
}

/* ─── Personalized recommendation ─── */

.wdwq-personal-reco {
    margin-bottom: 24px;
    padding: 20px;
    background: #f0f7ff;
    border-radius: 8px;
}

.wdwq-personal-reco .wdwq-reco-heading {
    margin-top: 0;
}

.wdwq-personal-reco__text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    margin: 0 0 12px;
}

/* Loading */
.wdwq-loading {
    text-align: center;
    padding: 40px 0;
    color: #999;
}

/* ─── Responsive ─── */

@media (max-width: 600px) {
    .wdwq-checker {
        padding: 20px 16px;
    }

    .wdwq-checker__heading {
        font-size: 20px;
    }

    .wdwq-checker__input-wrap {
        flex-direction: column;
    }

    .wdwq-checker__input {
        max-width: 100%;
    }

    .wdwq-params {
        grid-template-columns: 1fr;
    }
}
