/* hard apply the multiple select styles to override theme styles */
/* Placeholder for multi-select parent styles - kept for theme compatibility */

/* ==================== VEHICLE FORMS STYLES ==================== */

/* Modal Container - Important overrides */
.vehicle-form-modal {
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.vehicle-form-modal.hidden {
  display: none !important;
}

.vehicle-form-modal .bg-white {
  max-height: 90vh !important;
  overflow-y: auto !important;
  animation: modalSlideIn 0.3s ease-out !important;
  width: 100% !important;
  max-width: 72rem !important; /* max-w-6xl */
  margin: 2rem !important;
  background-color: white !important;
  border-radius: 0.5rem !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
  position: relative !important;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Removed tab navigation styles - now using individual modals */

/* Form Elements */
.vehicle-form-modal input,
.vehicle-form-modal textarea,
.vehicle-form-modal select {
  transition: all 0.2s ease-in-out;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  width: 100%;
  box-sizing: border-box;
  background-color: white;
}

.vehicle-form-modal input[type="datetime-local"] {
  min-height: 42px;
}

.vehicle-form-modal textarea {
  resize: vertical;
  min-height: 100px;
}

.vehicle-form-modal select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
}

.vehicle-form-modal input:focus,
.vehicle-form-modal textarea:focus,
.vehicle-form-modal select:focus {
  outline: none;
  border-color: var(--primary-color, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.vehicle-form-modal input:read-only {
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

/* Form Labels */
.vehicle-form-modal label {
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
  display: block;
}

/* Submit Button */
.vehicle-form-modal button[type="submit"] {
  transition: all 0.2s ease-in-out;
  background-color: var(--primary-color, #3b82f6);
  color: white;
  border: none;
  border-radius: 0.375rem;
  padding: 0.75rem 2rem;
  font-weight: 500;
  cursor: pointer;
  min-width: 120px;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.vehicle-form-modal button[type="submit"]:hover {
  background-color: var(--primary-dark, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.vehicle-form-modal button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Close Button */
.vehicle-form-modal #closeModalBtn,
.vehicle-form-modal #closeSaleVehicleModalBtn,
.vehicle-form-modal #closeTestDriveModalBtn,
.vehicle-form-modal #closeReservationModalBtn,
.vehicle-form-modal #closeTradeInModalBtn,
.vehicle-form-modal #closeFinancialModalBtn {
  transition: color 0.2s ease-in-out;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #6b7280;
}

.vehicle-form-modal #closeModalBtn:hover,
.vehicle-form-modal #closeSaleVehicleModalBtn:hover,
.vehicle-form-modal #closeTestDriveModalBtn:hover,
.vehicle-form-modal #closeReservationModalBtn:hover,
.vehicle-form-modal #closeTradeInModalBtn:hover,
.vehicle-form-modal #closeFinancialModalBtn:hover {
  background-color: #f3f4f6;
  color: #374151;
}

/* Modal Layout and Spacing */
.vehicle-form-modal .border-b {
  border-bottom: 1px solid #e5e7eb;
}

.vehicle-form-modal .p-4 {
  padding: 1rem;
}

.vehicle-form-modal .p-6 {
  padding: 1.5rem;
}

.vehicle-form-modal .m-8 {
  margin: 2rem;
}

/* Form Grid Layout */
.vehicle-form-modal .grid {
  gap: 1rem;
}

.vehicle-form-modal .grid-cols-1.md\:grid-cols-2 > div,
.vehicle-form-modal .grid-cols-1.md\:grid-cols-3 > div {
  min-width: 0;
}

.vehicle-form-modal .gap-4 {
  gap: 1rem;
}

.vehicle-form-modal .mt-4 {
  margin-top: 1rem;
}

.vehicle-form-modal .mt-6 {
  margin-top: 1.5rem;
}

.vehicle-form-modal .mb-2 {
  margin-bottom: 0.5rem;
}

.vehicle-form-modal .text-center {
  text-align: center;
}

/* Response Messages */
.form-response,
#response,
#saleVehicleResponse {
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid;
  font-weight: 500;
}

.form-response.success,
#response.success,
#saleVehicleResponse.success {
  background-color: #d1fae5;
  border-color: #34d399;
  color: #065f46;
}

.form-response.error,
#response.error,
#saleVehicleResponse.error {
  background-color: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

/* Removed tab content styles - now using individual modals */

.vehicle-form-modal input:invalid:focus,
.vehicle-form-modal textarea:invalid:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Field Error Styling */
.field-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.vehicle-form-modal input.border-red-500,
.vehicle-form-modal textarea.border-red-500 {
  border-color: #ef4444;
}

.vehicle-form-modal input.border-red-500:focus,
.vehicle-form-modal textarea.border-red-500:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Form Field Groups */
.vehicle-form-modal .form-field-group {
  margin-bottom: 1rem;
}

.vehicle-form-modal .form-field-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

/* Required Field Indicator */
.vehicle-form-modal label[for*="required"]::after,
.vehicle-form-modal label:has(+ input[required])::after {
  content: " *";
  color: #ef4444;
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .vehicle-form-modal .bg-white {
    margin: 1rem;
    max-width: calc(100vw - 2rem);
    max-height: calc(100vh - 2rem);
  }
  
  /* Removed tab button responsive styles - now using individual modals */
  
  .vehicle-form-modal .grid-cols-1.md\:grid-cols-2,
  .vehicle-form-modal .grid-cols-1.md\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .vehicle-form-modal .p-6 {
    padding: 1rem;
  }
  
  .vehicle-form-modal .m-8 {
    margin: 1rem;
  }
}

/* Ensure modal is above everything */
.vehicle-form-modal {
  z-index: 99999 !important;
}

/* Fix any Tailwind conflicts */
.vehicle-form-modal * {
  box-sizing: border-box;
}

.vehicle-form-modal .hidden {
  display: none !important;
}

.vehicle-form-modal .flex {
  display: flex !important;
}

.vehicle-form-modal .flex-wrap {
  flex-wrap: wrap !important;
}

.vehicle-form-modal .justify-between {
  justify-content: space-between !important;
}

.vehicle-form-modal .items-center {
  align-items: center !important;
}

/* ==================== EXISTING STYLES ==================== */

.ms-parent button.ms-choice {
  display: block;
  width: 100%;
  height: 26px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid #aaa;
  text-align: left;
  white-space: nowrap;
  line-height: 26px;
  color: #444;
  text-decoration: none;
  border-radius: 4px;
  background-color: #fff;
}

.ms-parent {
  input[type="radio"],
  .ms-drop input[type="checkbox"] {
    margin-top: 0;
  }
  button.ms-choice {
    height: 40px;
    /* tailwind text-gray-200 */
    border: 1px solid #d1d5db;
    border-radius: 500px;
  }
  button.ms-choice > span {
    top: 50%;
    transform: translateY(-50%);
    /* tailwind text-gray-600 */
    color: #475569;
    padding-left: 12px;
  }
  button.ms-choice > span {
    top: 50%;
    transform: translateY(-50%);
    padding-left: 12px;
  }
  button.ms-choice > .icon-caret {
    right: 12px;
  }
}
.ms-parent.model-year--min,
.ms-parent.model-year--max {
  width: 100% !important;
}

.ms-parent.model-year--min button.ms-choice {
  border-top-right-radius: 0px;
  border-bottom-right-radius: 0px;
}
.ms-parent.model-year--max button.ms-choice {
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
}

/* .ms-drop ul > li.hide-radio.selected label styles commented out for theme compatibility */

input.ca-number-input {
  height: 40px;
  border: 1px solid #d1d5db;
  border-radius: 500px;
}
/*👉input.ca-number-input:focus {
  outline: none !important;
  border: 1px solid #aaa;
}👈*/

input.ca-number-input.price--min {
  border-top-right-radius: 0px !important;
  border-bottom-right-radius: 0px !important;
}
input.ca-number-input.price--max {
  border-top-left-radius: 0px !important;
  border-bottom-left-radius: 0px !important;
}

.vehicle {
  position: relative;
}

.add-to-favorites {
  z-index: 500;
  position: absolute;
  right: 0;
  bottom: 0;
}
.add-to-favorites::after {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 50px 50px;
  border-color: transparent transparent #000000 transparent;
  position: absolute;
  bottom: 0;
  right: 0;
  opacity: 0.5;
  transition: all 0.3s ease;
  box-sizing: border-box;
  border-bottom-right-radius: 7px;
}
.add-to-favorites:hover::after,
.add-to-favorites:focus::after {
  opacity: 1;
}
.add-to-favorites button {
  position: relative;
  z-index: 501;
  color: #fff;
  background: transparent;
  border: 1px solid transparent;
  padding: 6px 12px;
  height: 50px;
  width: 50px;
  font-size: 16px;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  i {
    position: absolute;
    bottom: 5px;
    right: 5px;
    height: 18px;
    width: 18px;
  }
}
.add-to-favorites {

  button:hover,
  button:active {
    border: 1px solid transparent;
    background: transparent;
  }
  button.active {
    color: goldenrod;
  }
}

.add-to-favorites:hover .add-to-favorites:has(> a.vehicle) { 
  border: 1px solid red !important;
}

/*👉
.cars-automation-plugin {
  ➡ btn reset ⬅
  [type="button"],
  [type="submit"],
  button {
    display: initial;
    font-weight: 400;
    color: initial;

    background-color: initial;
    border: initial;
  }

  [type="button"]:hover,
  [type="submit"]:hover,
  button:hover {
    background: initial;
    color: initial;
  }
}👈*/
/*👉
button.custom-button {
  ➡ background: var(--primary); ⬅
  border: 1px solid transparent;
  padding: 8px 24px;
  ➡ color: var(--neutrals-white); ⬅
  border-radius: 500px;
  font-size: 18px;
}

button.custom-button:focus,
button.custom-button:hover {
  ➡ background: var(--primary); ⬅
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); ➡ Subtle shadow on hover ⬅
}

a {
  text-decoration: none !important;
  ➡ color: var(--primary) !important; ⬅
}

a:active,
a:hover {
  color: primary !important;
  text-decoration: underline !important;
}👈*/

/* ===================== gallery */

.ca-gallery {
  .ca-gallery-image {
    .ca-remaining-number {
      z-index: 1;
      font-size: 32px;
      /* color: var(--neutrals-white); */
      font-weight: bold;
    }
  }
}

.vehicle-details {
  /*👉  h1,
  h2 {
    margin: 0;
    ➡ font-weight: 600; ⬅
  }
  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }

  .price {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    
  }👈*/
}

/*👉
.select2-dropdown {
  border: 1px solid red!important;
}
.select2-selection {
  border: 1px solid green!important;
}👈*/
/*👉

body {
  color: rgb(5 36 81/var(--tw-text-opacity));
}

a {
  color: inherit!important;
}


.car-listing-hover:hover{
    border-color: #000 !important;
}

.listing-thumbnail{
    height: 180px!important;
}


select {
    width: 300px;
}

.pagination {
    float: inline-end !important;
}

.pagination li{
    cursor: pointer !important;
}
.page-link{
    cursor: pointer !important;
}


➡ PRICE RANGE - Starting ⬅
.model-input,
    .price-input {
      width: 100%;
      display: flex;
      margin: 0px 0 8px;
    }

    .model-input .field,
    .price-input .field {
      display: flex;
      width: 100%;
      height: 35px;
      align-items: center;
    }

    .field input {
      width: 100%;
      ➡ height: 100%; ⬅
      min-width: 100px;

      outline: none;
      ➡ font-size: 19px; ⬅
      margin-left: 12px;
      border-radius: 5px;
      text-align: center;
      border: 1px solid #ddd;
      -moz-appearance: textfield;
      padding-top: 0px !important;
    padding-bottom: 0px !important;
    }

    input[type="number"]::-webkit-outer-spin-button,
    input[type="number"]::-webkit-inner-spin-button {
      -webkit-appearance: none;
    }

    .model-input .separator,
    .price-input .separator {
      width: 100px;
      display: flex;
      ➡ font-size: 19px; ⬅
      align-items: center;
      justify-content: center;
    }

    .slider {
      height: 5px;
      position: relative;
      background: #ddd;
      border-radius: 5px;
    }

    .slider .progress {
      height: 100%;
      ➡ 
      left: 25%; 
      right: 25%;
      ⬅
      left: 0%;
      right: 0%;
      position: absolute;
      border-radius: 5px;
      background: #17A2B8;
    }

    .range-input {
      position: relative;
    }

    .range-input input {
      position: absolute;
      width: 100%;
      height: 5px;
      top: -5px;
      background: none;
      pointer-events: none;
      -webkit-appearance: none;
      -moz-appearance: none;
    }

    input[type="range"]::-webkit-slider-thumb {
      height: 17px;
      width: 17px;
      border-radius: 50%;
      background: #17A2B8;
      pointer-events: auto;
      -webkit-appearance: none;
      box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
    }

    input[type="range"]::-moz-range-thumb {
      height: 17px;
      width: 17px;
      border: none;
      border-radius: 50%;
      background: #17A2B8;
      pointer-events: auto;
      -moz-appearance: none;
      box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
    }
    
➡ PRICE RANGE - Ending ⬅



.select2-selection__clear {
  display: flex!important;
  justify-content: center!important;
  align-items: center!important;
}
👈
*/

/* ==================== MAIN PAGE ALERTS ==================== */

/* Main Page Alert Container */
#mainPageAlert {
  position: relative;
  z-index: 10;
  width: 100%;
  margin-bottom: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  animation: alertSlideIn 0.3s ease-out;
  font-weight: 500;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

#mainPageAlert .alert-message {
  flex: 1;
  line-height: 1.5;
  font-size: 0.95rem;
  font-weight: 500;
}

#mainPageAlert .alert-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: inherit;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
  margin-top: -2px;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mainPageAlert .alert-close-btn:hover {
  opacity: 1;
}

/* Alert Type Styles */
#mainPageAlert.success {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-left: 4px solid #22c55e;
  transition: all 0.2s ease;
}

#mainPageAlert.error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  transition: all 0.2s ease;
}

#mainPageAlert.info {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  transition: all 0.2s ease;
}

#mainPageAlert.warning {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fed7aa;
  border-left: 4px solid #f59e0b;
  transition: all 0.2s ease;
}

/* Hover effects for alerts */
#mainPageAlert:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -2px rgba(0, 0, 0, 0.15);
}

/* Enhanced Alert Styling */
#mainPageAlert {
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Ensure alert integrates well with page layout */
.cars-automation-plugin #mainPageAlert {
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
}

.vehicle-details #mainPageAlert {
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #mainPageAlert {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  #mainPageAlert .alert-close-btn {
    font-size: 1.25rem;
  }
}

@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes alertSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

#mainPageAlert.hiding {
  animation: alertSlideOut 0.3s ease-in forwards;
}

#mainPageAlert.hidden {
  display: none !important;
}

/* ==================== EXISTING STYLES ==================== */
