@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

h1, h2, h3, h4, h5, p, div, button, a, input {
    font-family: "DM Sans", sans-serif;
}

/* General Body/Container Styles */choice-patente
.ev-container {
    max-width: 800px;
    margin: 40px auto;
    color: #333;
    line-height: 1.6;
    padding: 52px 52px;
    background: rgb(250 251 255);
    border-radius: 20px;
    border: 1px solid #f1f1f1;
}

/* Card Style */
.ev-card {
    background: #ffffff7a; /* White background for cards */
    border-radius: 16px;
    padding: 60px 48px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Softer shadow */
    position: relative;
}


/* Inputs */
.ev-card label {
    display: block;
    margin-bottom: 16px;
    font-weight: 600;
    color: #121212; /* Dark grey for labels */
    margin-top: 32px;
    font-size: 1.1rem;
}

.ingre-datos-auto {
    width: 100%;
    grid-column: span 2;
    margin-bottom: 0px;
}

.ev-card input[type="text"],
.ev-card input[type="email"],
.ev-card select, #ev-phone {
    width: calc(100% - 24px);
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #e3eaf1;
    background-color: #fcfdff;
    color: #333;
    border-radius: 10px;
    font-size: 1rem;
    font-family: "DM Sans", sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Dropdown height limitation using CSS-only approach */
.ev-card select {
    /* Most browsers will respect this for the dropdown */
    max-height: 200px;
}

/* For WebKit browsers (Chrome, Safari, newer Edge) */
.ev-card select::-webkit-scrollbar {
    width: 6px;
}

.ev-card select::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.ev-card select::-webkit-scrollbar-thumb {
    background: #007cba;
    border-radius: 3px;
}

.ev-card select::-webkit-scrollbar-thumb:hover {
    background: #005a9e;
}

/* Enhanced option styling */
.ev-card select option {
    padding: 8px 12px;
    line-height: 1.4;
    background: white;
    color: #333;
}

.ev-card select option:hover {
    background: #f0f8ff;
}

.ev-card select option:checked {
    background: #007cba;
    color: white;
}

/* Separator options styling */
.ev-card select option[disabled] {
    background: #f8f9fa !important;
    color: #666 !important;
    font-weight: bold !important;
    font-size: 0.9rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    cursor: default;
}

/* Most wanted brands styling */
.ev-card select option[style*="font-weight: 500"] {
    color: #007cba;
    font-weight: 500;
}

.ev-card select option[style*="font-weight: 500"]:hover {
    background: #e3f2fd;
}

.ev-card #patente-input-container input[type="text"] {
    width: calc(100% - 40%);
    color: #035fbb;
    text-transform: uppercase;
}



.ev-card input:focus,
.ev-card select:focus {
    border-color: #007bff; /* Blue on focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.2); /* Subtle glow on focus */
}

.ev-card #patente-input-container input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
    color: #035fbb;
    text-transform: uppercase;
    font-weight: 600;
}

/* Form grid for multiple fields */
.ev-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.ev-card p, .texto-descriptivo {
    width: 80%;
    color: #7c97af;
}

.ev-card h4 {
    color: black;
    font-weight: 600;
    margin-bottom: 4px;
    margin-top: 32px;


}
/* Buttons */
.ev-card .ev-action-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 6px;
    background: #007bff; /* Primary button color */
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.1s ease;
    margin-top: 10px;
    font-family: "DM Sans", sans-serif;
}

.ev-card .ev-action-btn:hover {
    background: #0056b3; /* Darker blue on hover */
    transform: translateY(-1px);
}

.ev-card .ev-action-btn:active {
    transform: translateY(0);
}

.ev-choice-btn {
    display: block !important;
    padding: 28px 32px !important;
    border: 1px solid #ced6ed !important;
    border-radius: 20px !important;
    background: #ffffff !important; /* White background */
    color: #007bff !important; /* Blue text */
    font-size: 1.3rem !important;
    font-weight: 400 !important;
    cursor: pointer ;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.1s ease;
    margin-top: 10px !important;
}

.ev-choice-btn:hover {
    background: #e6f2ff !important;
    border-color: #d1e8ff !important;
    color: #0056b3 !important;
    transform: translateY(-1px) !important;
    border: 1px solid #d1e8ff !important;
}

.ev-choice-btn.active {
    background: #f2f8ff !important;
    color: #1a84ee !important;
    border-color: #b6dbff !important;
    box-shadow: 0 2px 4px rgb(119 120 122 / 20%) !important;
}

.ev-back-btn {
    position: absolute !important;
    top: 15px !important;
    right: 15px !important;
    border: none !important;
    font-size: 1rem !important;
    color: #007bff !important;
    background-color: #3788d826 !important;
    cursor: pointer !important;
    padding: 4px 12px !important;
    line-height: 1 !important;
    text-align: center !important;
    border-radius: 8px !important;
}

.ev-back-btn:hover {
    color: #1270d5 !important;
    background-color: #3788d861 !important;
}


/* Calendar */
#calendar {
    margin-top: 30px;
    border-radius: 8px;
    background: #ffffff; /* White background for calendar */
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* Softer shadow */
    border: 1px solid #e0e0e0;
}

/* Progress Steps */

.box-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ev-steps {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 30px;
    padding: 0 10px;
    position: relative;
}

.ev-step {
    flex: 1;
    text-align: center;
    padding: 12px 24px;
    margin: 0 8px;
    background: White; /* Light grey for inactive steps */
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    color: #afbfcd; /* Grey for inactive text */
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Subtle shadow */
    width: fit-content;
}

.ev-step.active {
    background: #007bff; /* Primary blue for active */
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.25); /* More prominent shadow for active */
    transform: translateY(-2px);
}

.ev-step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.2) 75%, transparent 75%, transparent); /* Subtle pattern */
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.ev-step.active::before {
    opacity: 1;
}

.ev-step:last-child::after {
    display: none;
}

.ev-step-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #023962;
    margin-bottom: 20px;
    padding-bottom: 10px;
    margin-top: 0px;
}

p.text-description {
    justify-self: center;
    font-weight: 400;
    text-align: center;
    color: #888bad;
}

.ev-appraisal-choice {
    display: flex;
    gap: 24px;
}

.ev-step-text {
    font-weight: 700;
    margin-top: 18px;
    font-size: 0.8rem;
    text-transform: uppercase;
}

/* Marca los steps anteriores como completados en verde */
.ev-step.ev-completed,
.step.ev-completed {
  background-color: #b6dbff !important; /* verde */
  color: #1a84ee !important;
  transition: background-color 0.2s ease;
}

/* Asegura contraste interno */
.ev-step.ev-completed *,
.step.ev-completed * {
  color: inherit !important;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .ev-form-grid {
        grid-template-columns: 1fr;
    }
    .ev-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 9px;
        padding: 0 0px;
    }
    .ev-step {
        flex-basis: 45%;
        margin-bottom: 0px;
    }
}

@media (max-width: 480px) {
    .ev-step {
        flex-basis: 90%;
    }
    .ev-card {
        padding: 20px;
    }
    .ev-card h3 {
        font-size: 1.5rem;
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .ev-container {
        padding: 20px 16px;
        margin: 20px 12px;
    }
    
    .ev-step-text {
        font-size: 0.5rem;
    }
    
    .ev-step {
        font-size: 0.8rem;
        padding: 12px 20px;
    }
    
    .ev-choice-btn {
        font-size: 0.8rem !important;
        padding: 12px 20px !important;
        border-radius: 12px !important;
    }
    
    .ev-card p {
        width: 100%;
        font-size: 0.9rem;
    }
    
    .ev-card label {
        margin-bottom: 8px;
        margin-top: 18px;
        font-size: 1rem;

    }
    
    .ev-card input[type="text"], .ev-card input[type="email"], .ev-card select {
        grid-column: span 2;
    }
    
    .ev-back-btn {
        position: unset !important;
        font-size: 0.7rem !important;
        margin-bottom: 6px !important;
    }
}


/* Global Loader - FIXED VERSION */
#ev-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    flex-direction: column;
}

/* Show loader when active */
#ev-loader.ev-loader-active {
    display: flex !important;
}

/* Fullscreen loader styling */
#ev-loader.ev-loader-fullscreen {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100vh;
    min-height: 100vh;
    text-align: center;
    padding: 16px;
    box-sizing: border-box;
}

/* Spinner for Loader */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px auto;
	display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loader text styling */
#ev-loader p {
    font-size: 1.1rem;
    color: #333;
    margin: 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 90%;
    text-align: center;
}

/* Ensure loader appears above everything */
#ev-loader.ev-loader-active,
#ev-loader.ev-loader-fullscreen {
    display: flex !important;
    z-index: 99999 !important;
}

#ev-vehicle-summary label {
    margin-top: 0px;
}

/* === [AGREGAR] Estilo tarjeta para los mensajes del loader === */
#ev-loader .ev-loader-text {
  display: inline-block;
  background: #ffffff;
  color: #111111;
  padding: 20px;
  border-radius: 20px;
  text-align: center;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  max-width: min(90vw, 560px);
  margin-top: 12px; /* separa el texto del spinner si existe */
}


.ev-form-grid label {
    grid-column: span 2;
}

input#car_km {
    margin-top: -24px;
}

#price-display span {
    font-size: 2.2rem;
    font-weight: 600;
    color: #121212;
}

div#price-display {
    text-align: left !important;
}

div#price-actions {
    display: flex;
    gap: 20px;
    flex-direction: row-reverse;
}

#price-actions button {
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1rem;
}



/* MINIMAL LOADER CSS - GUARANTEED TO WORK */
#ev-loader {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 99999;
}

/* Spinner */
#ev-loader .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: -30px;
}

/* Message */
#ev-loader p {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin-top: 30px;
    color: #333;
    font-size: 16px;
    text-align: center;
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 300px;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.am-input-phone-wrapper {
    
}

.am-fs__congrats-info-app-employee, .am-fs__congrats-info-app-service, div#am-cf-1, div#am-cf-2, div#am-cf-3, div#am-cf-4, div#am-cf-9, div#am-cf-11, div#am-cf-17 {
    
    display: none !important;

}

.am-input-phone-wrapper {
    pointer-events:none!important;
}

/* Terms & Conditions Checkbox */
.ev-terms-container {
    margin: 20px 0;
    text-align: left;
}

.ev-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    line-height: 1.5;
    gap: 12px;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

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

.ev-checkmark {
    width: 20px;
    height: 20px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s ease;
    cursor: pointer;
    z-index: 1;
}

.ev-checkbox-wrapper:hover .ev-checkmark {
    border-color: #007cba;
}

.ev-checkbox-wrapper input[type="checkbox"]:checked + .ev-checkmark {
    background-color: #007cba;
    border-color: #007cba;
}

.ev-checkbox-wrapper input[type="checkbox"]:checked + .ev-checkmark:after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.ev-terms-text {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

.ev-terms-text a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.ev-terms-text a:hover {
    text-decoration: underline;
}

/* Disabled button styling */
.ev-action-btn:disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.ev-action-btn:disabled:hover {
    background-color: #ccc !important;
    transform: none !important;
}

/* Chilean phone input with prefix */
.ev-phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e3eaf1;
    border-radius: 10px;
    background-color: #fcfdff;
    margin-bottom: 18px;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.ev-phone-input-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.2);
}

.ev-phone-prefix {
    background-color: #f8f9fa;
    border-right: 1px solid #e3eaf1;
    padding: 12px 15px;
    font-weight: 600;
    color: #007cba;
    font-size: 1rem;
    font-family: "DM Sans", sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.ev-phone-input-wrapper #ev-phone {
    border: none;
    background: transparent;
    padding: 12px 15px;
    margin: 0;
    width: 100%;
    font-size: 1rem;
    font-family: "DM Sans", sans-serif;
    color: #333;
}

.ev-phone-input-wrapper #ev-phone:focus {
    outline: none;
    box-shadow: none;
}
