/**
 * SureCart product page: emerging-country discount block.
 *
 * Ported from the inline <style> of Fluent Snippet 35; enqueued only on
 * sc_product pages whose product is in a qualifying collection.
 */

/* Trigger text - inherits color from Bricks */
#ies-emerging-country-block .ies-ec-trigger {
    cursor: pointer;
    text-underline-offset: 3px;
    user-select: none;
    transition: opacity 0.2s;
    display: inline-block;
}

#ies-emerging-country-block .ies-ec-trigger:hover {
    opacity: 0.75;
}

#ies-emerging-country-block .ies-ec-trigger.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

.ies-ec-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ies-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes ies-spin {
    to { transform: rotate(360deg); }
}

.ies-ec-result {
    margin-top: 10px;
}

.ies-ec-coupon-box {
    background: #f7f7f7;
    box-shadow: 0 0 0 1px #eae0da61;
    border-radius: 8px;
    padding: 14px 18px;
    text-align: center;
}

.ies-ec-coupon-box p {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: rgba(22, 22, 22, 0.8);
    line-height: 1.5;
}

.ies-ec-coupon-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    border-radius: 6px;
    padding: 8px 20px;
    width: fit-content;
    margin: auto;
}

.ies-ec-coupon-code {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.ies-ec-copy {
    color: #fb652c;
    background: none;
    border: 1px solid #fb652c;
    font-size: 12px;
    font-weight: 400;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.ies-ec-copy:hover {
    opacity: 0.75;
}

.ies-ec-not-eligible {
    background: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #777;
    text-align: center;
    line-height: 1.5;
}

.ies-ec-error {
    background: #fff5f5;
    border: 1px solid #f5c6c6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #c0392b;
    text-align: center;
    line-height: 1.5;
}

.ies-ec-retry {
    background: none;
    border: none;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    padding: 0;
    margin-top: 6px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
