/**
 * Motorcycle Search Plugin - Search Form Styles
 */

/* Base styles */
.msp-search-form {
    max-width: 100%;
    margin: 0 auto 30px;
    font-family: inherit;
}

.msp-search-form h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.msp-search-form form {
    width: 100%;
}

.msp-search-fields {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

/* Input and select styles */
.msp-search-field {
    position: relative;
}

.msp-search-form input[type="text"],
.msp-search-form select {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 20px; /* Will be overridden by settings */
    font-size: 14px;
    outline: none;
    width: 100%;
    min-height: 42px; /* Will be overridden by settings */
    background-color: #fff;
}

/* Specific sizes for different fields */
.msp-search-form:not(.msp-vertical) .msp-search-input {
    width: 200px; /* Will be overridden by settings */
    flex: 0 0 150px; /* Will be overridden by settings */
}

.msp-search-form:not(.msp-vertical) .msp-search-brand,
.msp-search-form:not(.msp-vertical) .msp-search-model,
.msp-search-form:not(.msp-vertical) .msp-search-year {
    flex: 0 0 150px;
}

.msp-search-form:not(.msp-vertical) .msp-search-button {
    flex: 0 0 auto;
}

/* Select dropdown styles */
.msp-search-form select {
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="black" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.msp-search-form select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Button styles */
.msp-search-form button {
    padding: 10px 20px;
    background-color: #000; /* Will be overridden by settings */
    color: #fff; /* Will be overridden by settings */
    border: none;
    border-radius: 20px; /* Will be overridden by settings */
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    min-height: 42px; /* Will be overridden by settings */
    height: 42px; /* Will be overridden by settings */
    width: 100%;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.msp-search-form button:hover {
    background-color: #333;
}

/* Active filters */
.msp-active-filters {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.msp-active-filters h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.msp-active-filters ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px 0;
}

.msp-active-filters li {
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: #eee;
    border-radius: 3px;
    font-size: 14px;
}

.msp-remove-filter {
    margin-left: 5px;
    color: #999;
    text-decoration: none;
}

.msp-clear-all-filters {
    font-size: 14px;
    padding: 5px 10px;
}

/* Responsive styles - Fixed spacing for mobile */
@media (max-width: 768px) {
  .msp-search-form {
    padding: 15px;
    margin-bottom: 20px;
  }

  .msp-search-fields {
    display: flex;
    flex-direction: column;
    gap: 6px;               /* Yalnızca gap bırakıyoruz */
  }

  .msp-search-field {
    width: 100%;
    margin-bottom: 0;      /* margin-bottom’u sıfırlıyoruz */
  }

  .msp-search-form input,
  .msp-search-form select,
  .msp-search-form button {
    width: 100%;
    min-height: 40px;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
  }
  .msp-search-form:not(.msp-vertical) .msp-search-input,
  .msp-search-form:not(.msp-vertical) .msp-search-brand,
  .msp-search-form:not(.msp-vertical) .msp-search-model,
  .msp-search-form:not(.msp-vertical) .msp-search-year {
    flex: 0 0 auto;   /* flex-basis artık auto, width:100% devrede */
    width: 100%;      /* tam genişlik */
  }
}
