/**
 * Free Shipping Notice Styles
 * Using BEM naming convention for class names
 */

/* Free Shipping Notice Styles */
.ip-free-shipping {
    margin: 15px 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.4;
    width: 100%;
}

.ip-free-shipping__inner {
    background-color: #f7f7f7;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ip-free-shipping__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    align-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.ip-free-shipping__message {
    display: flex;
    align-items: flex-start !important;
    white-space: nowrap;
    flex-grow: 0;
    flex-shrink: 0;
    margin-right: 10px;
}

.ip-free-shipping__icon img {
    position: relative !important;
    top: 0 !important
}

.ip-free-shipping__message--success {
    color: #2ca01c;
}

.ip-free-shipping__excluded-info {
    display: flex;
    align-items: flex-start;
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
}

.ip-free-shipping__shipping-cost {
    font-size: 0.9em;
    color: #666;
    white-space: nowrap;
}

.ip-free-shipping__icon,
.ip-free-shipping__icon-info {
    margin-right: 5px;
}

.ip-free-shipping__icon-info img {
    position: relative !important;
    top: 0 !important;
}

.ip-free-shipping__text,
.ip-free-shipping__excluded-text {
    display: inline-block;
    text-wrap: auto;

}

.ip-free-shipping__amount {
    font-weight: bold;
    color: #e94b35;
}

.ip-free-shipping__progress-wrapper {
    flex-grow: 1;
    min-width: 100px;
    max-width: 300px;
    width: 100%;
}

.ip-free-shipping__progress-container {
    height: 8px;
    background-color: #e1e1e1;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 10px;
}

.ip-free-shipping__progress-bar {
    height: 100%;
    background-color: #4caf50;
    transition: width 0.3s ease;
}

/* Адаптивність для мобільних пристроїв */
@media (max-width: 768px) {
    .ip-free-shipping__content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .ip-free-shipping__message {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }

    .ip-free-shipping__progress-wrapper {
        width: 100%;
        max-width: none;
    }

    .ip-free-shipping__excluded-info,
    .ip-free-shipping__shipping-cost {
        width: 100%;
        margin-top: 8px;
        white-space: normal;
    }

    .ip-free-shipping__progress-container {
        margin: 5px 0;
    }
}

/* Адаптивність для дуже вузьких екранів */
@media (max-width: 480px) {

    .ip-free-shipping__text,
    .ip-free-shipping__excluded-text {
        white-space: normal;
    }
}

/* Спеціальні стилі для міні-кошика */
.widget_shopping_cart .ip-free-shipping__inner {
    padding: 10px;
}

.widget_shopping_cart .ip-free-shipping__message,
.widget_shopping_cart .ip-free-shipping__excluded-info,
.widget_shopping_cart .ip-free-shipping__shipping-cost {
    width: 100%;
    margin-right: 0;
    margin-bottom: 5px;
    white-space: normal;
}

.widget_shopping_cart .ip-free-shipping__progress-wrapper {
    width: 100%;
    max-width: none;
}

.widget_shopping_cart .ip-free-shipping__progress-container {
    margin: 5px 0;
}

/* Admin Settings Styles */
/* Toggle Switch for Enable Hooks */
.ip-free-shipping-switch-container {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ip-free-shipping-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-right: 10px;
}

.ip-free-shipping-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ip-free-shipping-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.ip-free-shipping-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.ip-free-shipping-slider {
    background-color: #2196F3;
}

input:focus+.ip-free-shipping-slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked+.ip-free-shipping-slider:before {
    transform: translateX(26px);
}

.ip-free-shipping-switch-label {
    font-weight: 500;
}

/* Category Search Styles */
.ip-free-shipping-category-search-container {
    margin-bottom: 15px;
}

.ip-free-shipping-category-search-input {
    width: 300px;
    padding: 6px;
}

.ip-free-shipping-categories-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    background: #f9f9f9;
}

.ip-free-shipping-category-item {
    margin-bottom: 5px;
}

.ip-free-shipping-category-item label {
    display: inline-block;
    margin-left: 5px;
}

/* Shortcode Info Box */
.ip-free-shipping-shortcode-info {
    margin-top: 30px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
}