/**
 * Palatine International - Frontend Styles
 */

/* International Notice Banner */
.palatine-international-notice {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 100%);
    border: 1px solid #c5d9ed;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.palatine-notice-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.palatine-flag {
    font-size: 1.8em;
    line-height: 1;
}

.palatine-notice-text {
    color: #1e3a5f;
    font-size: 0.95em;
}

.palatine-notice-text strong {
    color: #0a4b78;
}

/* Currency Selector */
.palatine-currency-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #c5d9ed;
}

.palatine-currency-selector label {
    font-size: 0.85em;
    color: #555;
    white-space: nowrap;
}

.palatine-currency-selector select,
.palatine-currency-widget select {
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #c5d9ed;
    background: #fff;
    font-size: 0.9em;
    cursor: pointer;
    min-width: 100px;
}

.palatine-currency-selector select:hover,
.palatine-currency-widget select:hover {
    border-color: #2271b1;
}

/* Converted Price Display */
.palatine-converted-price {
    color: #666;
    font-size: 0.88em;
    margin-left: 6px;
    font-weight: normal;
}

.woocommerce-Price-amount + .palatine-converted-price {
    display: inline-block;
}

/* Restriction Notice */
.palatine-restriction-notice {
    background: linear-gradient(135deg, #fff8e6 0%, #fff3cd 100%);
    border: 1px solid #ffc107;
    border-left: 4px solid #e6a700;
    border-radius: 4px;
    padding: 15px 20px;
    margin: 20px 0;
    color: #856404;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.palatine-restriction-notice .dashicons {
    color: #e6a700;
    font-size: 20px;
    margin-top: 2px;
}

/* Hazardous Shipping Notice */
.palatine-hazardous-shipping-notice {
    font-size: 0.85em;
    color: #856404;
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff8e6;
    border-radius: 4px;
}

/* Product Badges */
.palatine-product-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.palatine-product-badge.international-available {
    background: #d4edda;
    color: #155724;
}

.palatine-product-badge.restricted {
    background: #f8d7da;
    color: #721c24;
}

/* WooCommerce Integration */
.woocommerce .palatine-international-notice {
    margin-bottom: 30px;
}

.woocommerce-cart .palatine-international-notice,
.woocommerce-checkout .palatine-international-notice {
    margin-bottom: 25px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .palatine-international-notice {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 15px;
    }

    .palatine-currency-selector {
        width: 100%;
        justify-content: space-between;
    }

    .palatine-notice-content {
        flex-wrap: wrap;
    }

    .palatine-flag {
        font-size: 1.5em;
    }

    .palatine-converted-price {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
}

/* Animation */
.palatine-international-notice {
    animation: palatine-fade-in 0.3s ease-out;
}

@keyframes palatine-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.palatine-loading {
    opacity: 0.6;
    pointer-events: none;
}

.palatine-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ddd;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: palatine-spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes palatine-spin {
    to {
        transform: rotate(360deg);
    }
}
