/* assets/css/ecu-finder.css */
/* Main form styling */
.ecu-finder-form-wrapper {
    max-width: 100%;
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.ecu-finder-title {
    text-align: center;
    color: #333;
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    font-weight: 600;
}

.ecu-finder-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ecu-finder-reg-section,
.ecu-finder-vehicle-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ecu-finder-reg-section label,
.ecu-finder-vehicle-section label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

/* Number Plate Styling */
@font-face {
    font-family: 'UKNumberPlate';
    src: url('../fonts/UKNumberPlate.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CharlesWright';
    src: url('../fonts/CharlesWright.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Base plate styling */
.ecu-finder-reg-wrapper {
    position: relative;
    margin-bottom: 20px;
}

/* Number plate input styling - improved to match preview */
.ecu-finder-reg-input {
    position: relative;
    display: flex;
    align-items: center;
    background-color: #F1F1F1;
    border: 3px solid #000;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow: hidden;
    padding-right: 10px;
}

.ecu-finder-reg-input input {
    flex: 1;
    border: none !important;
    padding: 12px !important;
    font-size: 24px !important;
    text-transform: uppercase;
    font-weight: bold;
    color: #000 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    letter-spacing: 2px;
    text-align: center;
    font-family: 'UKNumberPlate', Arial, sans-serif;
}

.ecu-finder-reg-input input:focus {
    outline: none;
    box-shadow: none !important;
    background-color: transparent !important;
}

/* GB/EU country identifier */
.ecu-finder-reg-country {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0055a4;
    color: white;
    width: 40px;
    height: 100%;
    font-size: 16px;
    font-weight: bold;
    border-right: 2px solid #000;
    position: relative;
    text-align: center;
    padding: 12px 0;
    align-self: stretch;
}

.ecu-finder-reg-country:after {
    content: '🇪🇺';
    position: absolute;
    top: 5px;
    font-size: 10px;
}

/* DVLA badge */
.ecu-finder-reg-badge {
    display: none;;
    position: absolute;
    bottom: 2px;
    right: 5px;
    background-color: #111;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: Arial, sans-serif;
    z-index: 2;
}

/* Region information */
.ecu-finder-reg-region {
    text-align: center;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* Number plate bolts */
.ecu-finder-reg-bolt {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: #777;
    border-radius: 50%;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.5);
}

.ecu-finder-reg-bolt.top-left {
    top: 5px;
    left: 5px;
}

.ecu-finder-reg-bolt.top-right {
    top: 5px;
    right: 5px;
}

.ecu-finder-reg-bolt.bottom-left {
    bottom: 5px;
    left: 5px;
}

.ecu-finder-reg-bolt.bottom-right {
    bottom: 5px;
    right: 5px;
}

/* Vintage plate style */
.ecu-finder-reg-input.vintage {
    background-color: #e9e3ca !important;
    border-color: #000;
}

.ecu-finder-reg-input.vintage input {
    background-color: transparent !important;
    color: #000 !important;
    font-family: 'CharlesWright', 'Times New Roman', serif;
    letter-spacing: 4px;
}

/* Yellow plate style (rear plate) */
.ecu-finder-reg-input.yellow-plate {
    background-color: #FFCC00 !important;
}

.ecu-finder-reg-input.yellow-plate input {
    background-color: transparent !important;
}

/* 3D effects */
.ecu-finder-reg-input.enable-3d {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    perspective: 500px;
}

.ecu-finder-reg-input.enable-3d:hover {
    transform: perspective(500px) rotateX(2deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Input validation styling */
.ecu-finder-reg-input.invalid {
    border-color: #ff0000;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* OR separator */
.ecu-finder-or {
    text-align: center;
    position: relative;
    margin: 15px 0;
    font-weight: 600;
    color: #666;
}

.ecu-finder-or:before,
.ecu-finder-or:after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 20px);
    height: 1px;
    background-color: #ddd;
}

.ecu-finder-or:before {
    left: 0;
}

.ecu-finder-or:after {
    right: 0;
}

/* Form fields styling */
.ecu-finder-field {
    margin-bottom: 10px;
}

.ecu-finder-field-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.ecu-finder-field-half {
    flex: 1;
}

.ecu-finder-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    height: auto !important;
}

.ecu-finder-button {
    background-color: #1e3f7a;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ecu-finder-button:hover {
    background-color: #163166;
}

.ecu-finder-button.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.ecu-finder-button.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;
    margin: -7.5px 0 0 -7.5px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: ecu-finder-spin 0.8s linear infinite;
}

.ecu-finder-submit {
    margin-top: 5px;
    width: 100%;
    padding: 12px;
}

.ecu-finder-button-wrapper {
    margin-top: 10px;
}

/* Loading animation */
.ecu-finder-loading {
    text-align: center;
    padding: 20px;
}

.ecu-finder-loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #1e3f7a;
    animation: ecu-finder-spin 1s linear infinite;
    margin-bottom: 10px;
}

/* Message styling */
.ecu-finder-message {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.ecu-finder-message.error {
    background-color: #ffe6e6;
    border: 1px solid #ffb3b3;
    color: #cc0000;
}

.ecu-finder-message.success {
    background-color: #e6ffe6;
    border: 1px solid #b3ffb3;
    color: #007700;
}

@keyframes ecu-finder-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive styling */
@media (max-width: 768px) {
    .ecu-finder-field-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .ecu-finder-field-half {
        width: 100%;
    }
    
    /* Make the font size smaller on mobile */
    .ecu-finder-reg-input input {
        font-size: 16px !important;
        padding: 10px !important;
    }
    
    .ecu-finder-reg-country {
        width: 30px;
    }
}

/* Sidebar widget specific styling */
.widget_ecu_finder_widget .ecu-finder-form-wrapper {
    padding: 15px;
}

.widget_ecu_finder_widget .ecu-finder-title {
    font-size: 18px;
}

.widget_ecu_finder_widget .ecu-finder-reg-input input {
    font-size: 14px !important;
}

.widget_ecu_finder_widget .ecu-finder-select,
.widget_ecu_finder_widget .ecu-finder-button {
    font-size: 13px;
    padding: 8px 10px;
}

/* Add these styles to your ecu-finder.css file */

.ecu-finder-message {
    margin: 15px 0;
    padding: 12px 15px;
    border-radius: 4px;
    position: relative;
}

.ecu-finder-message p {
    margin: 0 0 10px;
}

.ecu-finder-message.success {
    background-color: #e7f6e7;
    border: 1px solid #c3e6c3;
    color: #2e7d32;
}

.ecu-finder-message.error {
    background-color: #ffeaea;
    border: 1px solid #ffcbcb;
    color: #c62828;
}

.ecu-finder-view-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #1e3f7a;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

.ecu-finder-view-button:hover {
    background-color: #163166;
    color: white;
}

.ecu-finder-loading {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
}

/* Animation for the loading spinner */
@keyframes ecu-finder-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ecu-finder-loading-spinner {
    display: inline-block;
    width: 25px;
    height: 25px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #1e3f7a;
    animation: ecu-finder-spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}