/* Shipping Cost Calculator Specific Styles */

/* Shipping Analysis Display */
.shipping-analysis {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 2px solid #10b981;
}

.shipping-header {
    text-align: center;
    margin-bottom: 20px;
}

.shipping-title {
    font-size: 20px;
    font-weight: 600;
    color: #059669;
    margin-bottom: 8px;
}

.shipping-subtitle {
    font-size: 14px;
    color: #064e3b;
}

.cost-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.cost-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e2e8f0;
    text-align: center;
    transition: all 0.3s ease;
}

.cost-card:hover {
    border-color: #10b981;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
}

.cost-card.primary {
    border-color: #10b981;
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
}

.cost-card.secondary {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.cost-card.additional {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fefbf3, #fef3c7);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f8fafc;
}

.checkbox-item:hover {
    border-color: #2563eb;
    background: #f1f5f9;
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 3px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.shipping-breakdown {
    margin: 20px 0;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}

.breakdown-item:last-child {
    border-bottom: none;
    font-weight: 600;
    color: #1e293b;
    padding-top: 12px;
    margin-top: 8px;
    border-top: 2px solid #2563eb;
}

.breakdown-label {
    color: #64748b;
    font-size: 14px;
}

.breakdown-value {
    color: #374151;
    font-weight: 500;
    font-family: 'Roboto Mono', monospace;
}

.shipping-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.shipping-option {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
}

.shipping-option:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.shipping-option.recommended {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

.shipping-option.recommended::before {
    content: "Recommended";
    position: absolute;
    top: -8px;
    right: 16px;
    background: #10b981;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.option-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.option-price {
    font-size: 18px;
    font-weight: 700;
    color: #2563eb;
    font-family: 'Roboto Mono', monospace;
}

.option-details {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.option-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.option-features li {
    color: #475569;
    font-size: 13px;
    padding: 3px 0;
    position: relative;
    padding-left: 16px;
}

.option-features li:before {
    content: "✓";
    color: #10b981;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.delivery-timeline {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.delivery-timeline h4 {
    color: #92400e;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delivery-timeline h4:before {
    content: "🚚";
    font-size: 18px;
}

.timeline-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.timeline-item {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 12px;
    border-left: 4px solid #f59e0b;
}

.timeline-label {
    font-weight: 600;
    color: #92400e;
    font-size: 13px;
    margin-bottom: 4px;
}

.timeline-value {
    color: #78350f;
    font-size: 14px;
}

.cost-optimization {
    background: #ecfdf5;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.cost-optimization h4 {
    color: #065f46;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cost-optimization h4:before {
    content: "💡";
    font-size: 18px;
}

.optimization-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.optimization-tip {
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 12px;
    border-left: 4px solid #10b981;
}

.tip-title {
    font-weight: 600;
    color: #065f46;
    font-size: 14px;
    margin-bottom: 4px;
}

.tip-description {
    color: #047857;
    font-size: 13px;
    line-height: 1.4;
}

.shipping-tips {
    space-y: 16px;
}

.tip-item {
    padding: 16px;
    background: #f1f5f9;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 4px solid #2563eb;
}

.tip-item strong {
    color: #1e293b;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.tip-item p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

.cost-ranges {
    space-y: 12px;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.cost-service {
    font-weight: 500;
    color: #374151;
    font-size: 13px;
}

.cost-range {
    font-weight: 600;
    color: #2563eb;
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
}

/* Custom size row toggle */
#customSizeRow {
    transition: all 0.3s ease;
}

#customSizeRow.show {
    display: flex !important;
}

/* Primary result styling */
.primary-result .result-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.primary-result .result-value.free-shipping {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .shipping-options {
        grid-template-columns: 1fr;
    }
    
    .timeline-info {
        grid-template-columns: 1fr;
    }
    
    .optimization-tips {
        grid-template-columns: 1fr;
    }
    
    .breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .option-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Animation for cost reveal */
@keyframes costReveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.primary-result.animate .result-value {
    animation: costReveal 0.6s ease-out;
}

/* Loading states */
.shipping-options.loading {
    opacity: 0.6;
    pointer-events: none;
}

.shipping-options.loading::after {
    content: "Calculating shipping options...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    color: #374151;
}
