/* RajaOngkir Styles */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

.no-results {
    padding: 10px 15px;
    color: #666;
    font-style: italic;
    text-align: center;
}

.shipping-results {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.shipping-results h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.1rem;
}

.shipping-services {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.service-name {
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 150px;
}

.service-cost {
    font-weight: bold;
    color: #28a745;
    font-size: 1.1rem;
}

.service-etd {
    color: #666;
    font-size: 0.9rem;
}

.btn-select-shipping {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-select-shipping:hover {
    background: #0056b3;
}

.selected-shipping {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
}

.selected-shipping strong {
    color: #155724;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.loading::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

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

.alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 9999;
    min-width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: none;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .service-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .service-cost,
    .service-etd {
        align-self: flex-end;
    }
    
    .btn-select-shipping {
        align-self: stretch;
        text-align: center;
    }
    
    .alert {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* Form styling improvements */
.form-label {
    font-weight: 600;
    margin-bottom: 5px;
}

.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.position-relative {
    position: relative;
}

/* Loading animation for buttons */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom scrollbar for search results */
.search-results::-webkit-scrollbar {
    width: 6px;
}

.search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}