/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Form styles */
.shipping-form {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Dimensions group */
.dimensions-group h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 1.1rem;
}

.dimensions-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.dimensions-inputs div {
    display: flex;
    flex-direction: column;
}

.dimensions-inputs label {
    margin-bottom: 5px;
    font-size: 14px;
}

/* Packaging group */
.packaging-group {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #667eea;
}

/* Weight info */
.weight-info {
    background-color: #e3f2fd;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid #2196f3;
}

/* ServicePoint pricing styles */
.price-home {
    font-size: 0.9rem;
}

.price-servicepoint {
    font-size: 0.9rem;
    color: #4caf50;
    font-weight: 600;
}

/* Calculate button */
.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results styles */
.results {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.results h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.carriers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.carrier {
    border: 2px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.carrier.cheapest {
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

.carrier-header {
    padding: 15px;
    font-weight: 600;
}

.postnl .carrier-header {
    background-color: #ff6600;
    color: white;
}

.dhl .carrier-header {
    background-color: #ffcc00;
    color: #333;
}

.carrier-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.carrier-results {
    padding: 20px;
}

.shipping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #ddd;
}

.shipping-option.cheapest-option {
    background-color: #e8f5e8;
    border-left-color: #4caf50;
    font-weight: 600;
}

.option-name {
    flex: 1;
}

.option-price {
    font-weight: 600;
    font-size: 1.1rem;
}

.option-details {
    font-size: 0.9rem;
    color: #666;
    margin-top: 4px;
}

/* Best option highlight */
.best-option {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
}

.best-option .savings {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 5px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .shipping-form {
        padding: 20px;
    }
    
    .dimensions-inputs {
        grid-template-columns: 1fr;
    }
    
    .carriers {
        grid-template-columns: 1fr;
    }
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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