﻿/* Autoceny Calculator Styles */

.autoceny-calculator-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.autoceny-calculator {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
}

.autoceny-calculator h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    text-align: center;
}

.autoceny-desc {
    text-align: center;
    color: #666;
    margin: 0 0 30px 0;
    font-size: 15px;
}

.autoceny-form {
    margin-bottom: 30px;
}

.autoceny-form-group {
    margin-bottom: 20px;
}

.autoceny-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.autoceny-form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.autoceny-form-group select,
.autoceny-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.autoceny-form-group select:focus,
.autoceny-form-group input:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.autoceny-form-group select:disabled,
.autoceny-form-group input:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.autoceny-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.autoceny-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.autoceny-submit-btn:active {
    transform: translateY(0);
}

.autoceny-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: inline-block;
}

.autoceny-result {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-radius: 12px;
    border: 2px solid #667eea30;
}

.result-content h3 {
    font-size: 18px;
    color: #666;
    margin: 0 0 10px 0;
    text-align: center;
    font-weight: 600;
}

.result-price {
    font-size: 3.2em;
    font-weight: 800;
    color: #667eea;
    text-align: center;
    margin: 10px 0;
    line-height: 1.2;
}

.result-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-top: 15px;
    line-height: 1.6;
}

.result-info strong {
    color: #333;
    font-weight: 600;
}

.autoceny-error {
    margin-top: 20px;
    padding: 16px 20px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    color: #856404;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .autoceny-calculator {
        padding: 30px 20px;
    }
    
    .autoceny-calculator h2 {
        font-size: 24px;
    }
    
    .autoceny-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .result-price {
        font-size: 32px;
    }
}

/* Loading animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-loader::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}


/* Average Mileage Section */
.autoceny-avg-km-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #f0f8ff;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
}

.autoceny-avg-km-group label {
    color: #2271b1;
    font-weight: 600;
    margin-bottom: 8px;
}

.autoceny-avg-km-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.autoceny-avg-km-row input[readonly] {
    flex: 1;
    background: #fff;
    border: 2px solid #2271b1;
    color: #135e96;
    font-weight: 600;
    cursor: default;
}

.autoceny-use-avg-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.autoceny-use-avg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #135e96 0%, #0a4a75 100%);
}

.autoceny-use-avg-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .autoceny-avg-km-row {
        flex-direction: column;
    }
    
    .autoceny-use-avg-btn {
        width: 100%;
    }
}
