/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Smooth scrolling for the page */
html {
    scroll-behavior: smooth;
}

/* Address Validation Styles */
.dumb-shipping-validation-messages {
    margin: 10px 0;
    transition: all 0.3s ease;
}

.dumb-shipping-address-suggestion {
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid #00a0d2;
    background: #f7f7f7;
    transition: all 0.3s ease;
}

/* Highlight animation for when scrolled into view */
.dumb-shipping-validation-messages.scroll-highlight {
    animation: highlightPulse 1.5s ease-out;
}

@keyframes highlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 160, 210, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(0, 160, 210, 0.1);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 160, 210, 0);
    }
}

.dumb-shipping-address-suggestion .address-comparison {
    display: flex;
    gap: 20px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.dumb-shipping-address-suggestion .original-address,
.dumb-shipping-address-suggestion .suggested-address {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.dumb-shipping-address-suggestion .suggested-address {
    border-color: #00a0d2;
    background: #f0f8ff;
}

.dumb-shipping-validation-message {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 3px;
}

.dumb-shipping-validation-message.woocommerce-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.dumb-shipping-validation-message.woocommerce-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Button spacing for address suggestions */
.dumb-shipping-address-suggestion .button-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
}

.dumb-shipping-address-suggestion .button-container .button {
    flex: 1;
    margin-bottom: 5px;
    text-align: center;
}

.dumb-shipping-address-suggestion .button-container .button:last-child {
    margin-right: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dumb-shipping-address-suggestion .address-comparison {
        flex-direction: column;
        gap: 10px;
    }
    
    .dumb-shipping-address-suggestion .original-address,
    .dumb-shipping-address-suggestion .suggested-address {
        min-width: auto;
    }
    
    .dumb-shipping-address-suggestion .button-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .dumb-shipping-address-suggestion .button-container .button {
        flex: none;
        width: 100%;
        margin-right: 0;
        margin-bottom: 0;
        text-align: center;
    }
    
    .dumb-shipping-address-suggestion .button-container .button:last-child {
        margin-bottom: 0;
        margin-top: 10px; /* Add some space above the last button */
    }
}