/* Import DM Sans en Bebas Neue fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Bebas+Neue&display=swap');

/* Inline Postcode Check Shortcode */
.postcode-check-shortcode {
    padding: 0;
    border-radius: 0;
    margin: 20px 0;
    font-family: 'DM Sans', sans-serif;
}

.postcode-check-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #000;
}

.postcode-check-description {
    font-family: 'DM Sans', sans-serif;
    margin: 0 0 20px 0;
    color: #000;
    line-height: 1.6;
    font-size: 14px;
}

.postcode-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

#postcode-input-inline {
    flex: 1;
    padding: 15px 20px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    border: none;
    border-radius: 0;
    background: #d9d9d9;
    color: #000;
}

#postcode-input-inline::placeholder {
    color: #000;
}

#postcode-input-inline:focus {
    outline: none;
    background: #d9d9d9;
}

.postcode-submit-inline {
    padding: 15px 80px;
    background: #007a4e;
    color: white;
    border: none;
    border-radius: 0;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
    white-space: nowrap;
}

.postcode-submit-inline:hover {
    background: #000;
}

.postcode-submit-inline:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.postcode-message-inline {
    margin-top: 15px;
    font-family: 'DM Sans', sans-serif;
}

/* HELAAS bericht styling */
.postcode-not-deliverable-wrapper {
    padding: 0;
    border-radius: 0;
    margin: 20px 0;
}

.postcode-not-deliverable {
    font-family: 'DM Sans', sans-serif;
}

.helaas-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #000;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.helaas-text {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #000;
    margin: 0 0 20px 0;
}

.postcode-contact-button {
    display: inline-block;
    padding: 15px 80px !important;
    background: #007a4e !important;
    color: white !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    font-family: 'Bebas Neue', sans-serif !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    transition: background 0.3s !important;
    border: none !important;
}

.postcode-contact-button:hover {
    background: #000 !important;
    color: white !important;
}

.postcode-contact-button::after {
    display: none !important;
}

/* Verberg Divi WooCommerce modules als geen postcode of ongeldige postcode */
body.no-postcode-set .et_pb_wc_add_to_cart,
body.no-postcode-set .et_pb_wc_price,
body.no-postcode-set #rr-meer-info,
body.postcode-invalid .et_pb_wc_add_to_cart,
body.postcode-invalid .et_pb_wc_price,
body.postcode-invalid #rr-meer-info {
    display: none !important;
}

/* Toon ze alleen als postcode geldig is */
body.postcode-valid .et_pb_wc_add_to_cart,
body.postcode-valid .et_pb_wc_price,
body.postcode-valid #rr-meer-info {
    display: block !important;
}

/* Responsive */
@media (max-width: 768px) {
    .postcode-input-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    #postcode-input-inline,
    .postcode-submit-inline {
        width: 100%;
    }
    
    .postcode-submit-inline {
        padding: 15px 20px;
    }
    
    .postcode-contact-button {
        width: 100%;
        text-align: center;
        padding: 15px 20px !important;
    }
}

/* Error messages */
.postcode-message-inline .error {
    color: #d63638;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
}

/* Checkout postcode tooltip styling */
.postcode-tooltip-blocks {
    margin-top: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-left: 4px solid #007a4e;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.4;
}

.postcode-tooltip-blocks strong {
    font-weight: 400;
}

.postcode-tooltip-blocks a {
    color: #007a4e;
    text-decoration: underline;
    font-weight: 700;
}

.postcode-tooltip-blocks a:hover {
    color: #000;
}

/* Tablet en mobiel: tooltip onder het veld, volle breedte */
@media (max-width: 980px) {
    .postcode-tooltip-blocks {
        width: 100% !important;
        margin-top: 10px !important;
        max-width: none !important;
        flex: none !important;
        display: block !important;
    }
}

/* Postcode flex wrapper - moet zich gedragen als andere form rows */
.postcode-flex-wrapper {
    display: contents !important;
}

@media (min-width: 981px) {
    /* Input wrapper moet zich gedragen als andere inputs */
    .postcode-flex-wrapper .wc-block-components-text-input {
        flex: 1 0 calc(50% - 12px) !important;
        width: auto !important;
        max-width: none !important;
    }
    
    /* Tooltip moet dezelfde flex properties krijgen als een input */
    .postcode-flex-wrapper .postcode-tooltip-blocks {
        flex: 1 0 calc(50% - 12px) !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
    }
}

@media (max-width: 980px) {
    .postcode-flex-wrapper .wc-block-components-text-input {
        flex: 1 0 100% !important;
        width: 100% !important;
    }
    
    .postcode-flex-wrapper .postcode-tooltip-blocks {
        flex: 1 0 100% !important;
        width: 100% !important;
        margin-top: 10px !important;
        display: block !important;
    }
}

/* Checkout postcode tooltip styling */
.postcode-tooltip-blocks {
    padding: 12px 15px;
    background: #f8f9fa;
    border-left: 4px solid #007a4e;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.4;
}

.postcode-tooltip-blocks strong {
    font-weight: 400;
}

.postcode-tooltip-blocks a {
    color: #007a4e;
    text-decoration: underline;
    font-weight: 700;
}

.postcode-tooltip-blocks a:hover {
    color: #000;
}