/**
 * UPS Shipping Display Styles
 * Enhanced visual design for shipping rate responses
 */

/* Success Container */
.ups-shipment-summary {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.ups-shipment-summary.success {
    border-color: #4CAF50;
}

.ups-shipment-summary:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Header Section */
.ups-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.ups-icon {
    font-size: 48px;
    line-height: 1;
}

.ups-title h4 {
    margin: 0 0 5px 0;
    font-size: 20px;
    color: #333;
    font-weight: 600;
}

.ups-service-name {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.service-code {
    color: #999;
    font-size: 12px;
    font-weight: 400;
}

/* Pricing Breakdown */
.ups-pricing-breakdown {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.pricing-row.main-price {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 12px;
    margin-bottom: 8px;
}

.pricing-row.main-price .price-label {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.pricing-row.main-price .price-value {
    font-size: 24px;
    font-weight: 700;
    color: #4CAF50;
}

.pricing-row.sub-price .price-label {
    font-size: 14px;
    color: #666;
    padding-left: 15px;
}

.pricing-row.sub-price .price-value {
    font-size: 14px;
    color: #666;
    font-weight: 600;
}

/* Alerts Section */
.ups-alerts {
    display: flex;
    gap: 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.alert-icon {
    font-size: 24px;
    line-height: 1;
}

.alert-content {
    flex: 1;
}

.alert-content strong {
    display: block;
    margin-bottom: 8px;
    color: #856404;
    font-size: 14px;
}

.alert-content ul {
    margin: 0;
    padding-left: 20px;
    list-style: disc;
}

.alert-content li {
    color: #856404;
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 4px;
}

/* Footer Section */
.ups-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.btn-recalculate-ups {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-recalculate-ups:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.ups-footer small {
    color: #999;
    font-size: 12px;
}

/* Error Container */
.ups-error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 12px;
    padding: 30px 20px;
    margin: 20px 0;
}

.ups-error-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.ups-error-content h4 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #c62828;
    font-weight: 600;
}

.ups-error-content p {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #d32f2f;
    line-height: 1.6;
    max-width: 500px;
}

.btn-retry-ups {
    background: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-retry-ups:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .ups-header {
        flex-direction: column;
        text-align: center;
    }
    
    .ups-icon {
        font-size: 36px;
    }
    
    .ups-title h4 {
        font-size: 18px;
    }
    
    .pricing-row {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
    
    .pricing-row.main-price .price-value {
        font-size: 20px;
    }
    
    .ups-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .alert-content ul {
        padding-left: 15px;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ups-shipment-summary,
.ups-error-container {
    animation: slideIn 0.3s ease-out;
}

/* Loading State */
.ups-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

.ups-loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ups-loading p {
    margin: 0;
    color: #666;
    font-size: 14px;
}
