/**
 * MetaShip Shipping - Option A Styles
 * Minimal CSS for carrier labels and pickup selection
 */

/* Carrier icon in shipping method label */
.metaship-carrier-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}

/* Responsive sizing for mobile */
@media (max-width: 768px) {
    .metaship-carrier-icon {
        width: 20px;
        height: 20px;
        margin-right: 6px;
    }
}

/* Carrier logo in shipping label */
.metaship-carrier-logo {
    height: 20px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
}

/* Shipping method label styling */
.woocommerce-shipping-methods .metaship-carrier-name {
    font-weight: 600;
}

.woocommerce-shipping-methods .metaship-type {
    color: #666;
    font-size: 0.9em;
    margin-left: 4px;
}

.woocommerce-shipping-methods .metaship-days {
    color: #888;
    font-size: 0.85em;
    margin-left: 8px;
}

/* Select pickup point button */
.metaship-select-pvz-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 13px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.metaship-select-pvz-btn:hover {
    background: #e9e9e9;
    border-color: #ccc;
}

/* Selected point display */
.metaship-selected-point {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    background: #e8f5e9;
    border-left: 3px solid #4caf50;
    font-size: 12px;
    color: #2e7d32;
}

/* Pickup map modal */
.metaship-pickup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999999;
}

.metaship-pickup-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.metaship-pickup-modal-content {
    background: #fff;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.metaship-pickup-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.metaship-pickup-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.metaship-pickup-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    color: #666;
}

.metaship-pickup-modal-close:hover {
    color: #333;
}

.metaship-pickup-modal-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.metaship-pickup-list {
    width: 300px;
    overflow-y: auto;
    border-right: 1px solid #ddd;
    padding: 10px;
}

.metaship-pickup-map {
    flex: 1;
    min-height: 400px;
}

.metaship-pickup-item {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.metaship-pickup-item:hover {
    border-color: #0066cc;
    background: #f8f9fa;
}

.metaship-pickup-item.selected {
    border-color: #0066cc;
    background: #e3f2fd;
}

.metaship-pickup-item-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.metaship-pickup-item-address {
    font-size: 12px;
    color: #666;
}

.metaship-pickup-item-hours {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

/* Loading state */
.metaship-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

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

/* Pickup point info on order details page */
.metaship-pickup-point-info {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.metaship-pickup-point-info h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metaship-pickup-point-info address {
    font-style: normal;
    line-height: 1.6;
    color: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .metaship-pickup-modal-body {
        flex-direction: column;
    }
    
    .metaship-pickup-list {
        width: 100%;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .metaship-pickup-map {
        min-height: 300px;
    }
}
