/**
 * Shipping - Public Styles
 * Frontend styles for WooCommerce shipping integrations
 */

/* ==========================================================================
   Checkout Shipping Elements
   ========================================================================== */

/* Shipping method selection enhancements */
.woocommerce-checkout .wt-shipping-method {
    margin: 10px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.woocommerce-checkout .wt-shipping-method:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.woocommerce-checkout .wt-shipping-method.selected {
    border-color: #0073aa;
    background: #e3f2fd;
}

/* ==========================================================================
   Courier Guy Integration
   ========================================================================== */

/* Locker selection interface */
.wt-courier-locker-selection {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.wt-courier-locker-selection h4 {
    margin-top: 0;
    color: #495057;
}

.wt-courier-locker-list {
    max-height: 300px;
    overflow-y: auto;
    margin: 10px 0;
}

.wt-courier-locker-item {
    padding: 10px;
    margin: 5px 0;
    border: 1px solid #ced4da;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wt-courier-locker-item:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.wt-courier-locker-item.selected {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.wt-courier-locker-info {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

/* ==========================================================================
   Loading States
   ========================================================================== */

.wt-shipping-loading {
    position: relative;
    opacity: 0.6;
}

.wt-shipping-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: wt-shipping-spin 1s linear infinite;
}

@keyframes wt-shipping-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   Error States
   ========================================================================== */

.wt-shipping-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border: 1px solid #f1aeb5;
    border-radius: 4px;
    margin: 10px 0;
}

.wt-shipping-notice {
    background: #d1ecf1;
    color: #0c5460;
    padding: 10px;
    border: 1px solid #b6d4da;
    border-radius: 4px;
    margin: 10px 0;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .wt-courier-locker-selection {
        padding: 10px;
    }

    .wt-courier-locker-list {
        max-height: 200px;
    }

    .wt-courier-locker-item {
        padding: 8px;
        font-size: 14px;
    }

    .wt-shipping-method {
        padding: 10px;
    }
}

/* ==========================================================================
   Theme Compatibility
   ========================================================================== */

/* Storefront theme compatibility */
.woocommerce.storefront .wt-shipping-method {
    margin-bottom: 1em;
}

/* Astra theme compatibility */
.woocommerce.astra .wt-courier-locker-selection {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}