/**
 * Vehicle Lookup V2 Styles
 * Clean, CAM Widget-inspired design
 * 
 * @package BlueMotorsV2
 * @since 2.0.0
 */

/* Container */
.bmv2-lookup-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Search Section */
.bmv2-search-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.bmv2-title {
    margin: 0 0 20px 0;
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    text-align: center;
}

.bmv2-search-form {
    position: relative;
}

.bmv2-input-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.bmv2-registration-input {
    flex: 1;
    padding: 14px 16px;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    border: 2px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s;
    letter-spacing: 1px;
}

.bmv2-registration-input:focus {
    border-color: #2271b1;
}

.bmv2-search-button {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #2271b1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.bmv2-search-button:hover {
    background: #135e96;
}

.bmv2-search-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Loading State */
.bmv2-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f0f6fc;
    border-radius: 6px;
    color: #2271b1;
    font-size: 14px;
}

.bmv2-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e3e8ee;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: bmv2-spin 0.8s linear infinite;
}

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

/* Error Message */
.bmv2-error {
    padding: 15px;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    border-radius: 6px;
    color: #991b1b;
    font-size: 14px;
}

/* Results Section */
.bmv2-results-section {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Vehicle Info */
.bmv2-vehicle-info {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f3f4f6;
}

.bmv2-vehicle-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.bmv2-vehicle-title {
    margin: 0 0 5px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.bmv2-vehicle-subtitle {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.bmv2-clear-button {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 24px;
    line-height: 1;
    color: #9ca3af;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.bmv2-clear-button:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* MOT Info */
.bmv2-mot-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 14px;
}

.bmv2-mot-label {
    font-weight: 600;
    color: #6b7280;
}

.bmv2-mot-date {
    font-weight: 700;
    color: #1a1a1a;
}

.bmv2-mot-info.mot-valid .bmv2-mot-date {
    color: #059669;
}

.bmv2-mot-info.mot-expiring-soon .bmv2-mot-date {
    color: #d97706;
}

.bmv2-mot-info.mot-expired .bmv2-mot-date {
    color: #dc2626;
}

/* Tyre Section */
.bmv2-tyre-section {
    margin-bottom: 25px;
}

.bmv2-section-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.bmv2-tyre-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bmv2-tyre-option {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.bmv2-tyre-option:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.bmv2-tyre-option.selected {
    border-color: #2271b1;
    background: #f0f6fc;
}

.bmv2-tyre-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    cursor: pointer;
}

.bmv2-tyre-details {
    flex: 1;
}

.bmv2-tyre-size {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.bmv2-tyre-specs {
    font-size: 13px;
    color: #6b7280;
}

/* Action Section */
.bmv2-action-section {
    text-align: center;
}

.bmv2-continue-button {
    padding: 16px 48px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #059669;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.bmv2-continue-button:hover {
    background: #047857;
}

.bmv2-continue-button:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 600px) {
    .bmv2-search-section,
    .bmv2-results-section {
        padding: 20px;
    }
    
    .bmv2-input-wrapper {
        flex-direction: column;
    }
    
    .bmv2-search-button {
        width: 100%;
    }
    
    .bmv2-title {
        font-size: 20px;
    }
    
    .bmv2-vehicle-title {
        font-size: 18px;
    }
}

/* MOT History Modal (Optional Enhancement) */
.bmv2-mot-history-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    padding: 20px;
}

.bmv2-mot-history-content {
    max-width: 700px;
    max-height: 80vh;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    overflow-y: auto;
}

.bmv2-mot-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.bmv2-mot-history-close {
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 24px;
    line-height: 1;
    color: #9ca3af;
    background: none;
    border: none;
    cursor: pointer;
}

.bmv2-mot-test {
    padding: 15px;
    margin-bottom: 15px;
    background: #f9fafb;
    border-radius: 6px;
    border-left: 4px solid #e5e7eb;
}

.bmv2-mot-test.passed {
    border-left-color: #059669;
}

.bmv2-mot-test.failed {
    border-left-color: #dc2626;
}
