/* cc-dropdown-search-plugin/css/cc-dropdown-search.css */

/* ——— حاوية الشورت كود: تمنع تمدده وتجعله في المنتصف ——— */
.ccds-search-wrapper {
  width: 100% !important;
  max-width: 920px !important;
  margin: 0 auto !important;
  text-align: center !important;
  box-sizing: border-box !important;
  clear: both !important;
}

/* ——— نموذج البحث ——— */
.ccds-search-wrapper #cc-dropdown-search-form {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 auto 1rem auto !important;
  padding: 0 !important;
  font-size: 1.1rem !important;
  float: none !important;
  text-align: center !important;
}

.ccds-search-wrapper #cc-dropdown-search-form label {
  font-weight: bold !important;
  margin: 0 .25rem !important;
  white-space: nowrap !important;
}

.ccds-search-wrapper #cc-dropdown-search-form select {
  width: auto !important;
  min-width: 190px !important;
  max-width: 260px !important;
  padding: .6em 2.5em .6em 1em !important;
  font-size: 1.1rem !important;
  border: 2px solid #3E1F75 !important;
  border-radius: 8px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: #fff !important;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%204%205'%3E%3Cpath%20fill='%233E1F75'%20d='M2%205L0%200h4z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 1em center !important;
  background-size: .65em auto !important;
  box-sizing: border-box !important;
  float: none !important;
}

.ccds-search-wrapper #cc-dropdown-search-form button {
  background: #3E1F75 !important;
  color: #fff !important;
  padding: .6em 1.2em !important;
  font-size: 1.1rem !important;
  border: none !important;
  border-radius: 5px !important;
  cursor: pointer !important;
  width: auto !important;
  float: none !important;
  white-space: nowrap !important;
}

/* ——— تنظيم النتائج ——— */
.ccds-search-wrapper .cc-results {
  width: 100% !important;
  max-width: 920px !important;
  margin: 0 auto !important;
  text-align: center !important;
}

.ccds-search-wrapper .cc-results ul {
  list-style: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: .5rem !important;
  width: 100% !important;
}

.ccds-search-wrapper .cc-results ul li {
  display: flex !important;
  justify-content: center !important;
  margin: 0 !important;
}

.ccds-search-wrapper .cc-results ul li a {
  display: inline-block !important;
  background-color: #3E1F75 !important;
  color: #fff !important;
  padding: .8em 1.2em !important;
  border-radius: 5px !important;
  text-decoration: none !important;
  text-align: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* ——— تكبير الأزرار على الديسكتوب ——— */
@media (min-width: 769px) {
  .ccds-search-wrapper .cc-results ul li a {
    font-size: 1.2rem !important;
    padding: 1em 1.5em !important;
  }
}

/* ——— responsive للموبايل ——— */
@media (max-width: 768px) {
  .ccds-search-wrapper {
    max-width: 420px !important;
    padding: 0 12px !important;
  }

  .ccds-search-wrapper #cc-dropdown-search-form {
    width: 100% !important;
    max-width: 360px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .65rem !important;
  }

  .ccds-search-wrapper #cc-dropdown-search-form label,
  .ccds-search-wrapper #cc-dropdown-search-form select,
  .ccds-search-wrapper #cc-dropdown-search-form button {
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  .ccds-search-wrapper .cc-results ul {
    grid-template-columns: 1fr !important;
  }
}
