/* AIMS University Search Directory — UI styles (v3.3.5) */

/* Container */
.aus-wrap { 
  max-width: 900px; 
  margin: 0 auto; 
}

/* Form */
.aus-form { 
  margin-bottom: 12px; 
  position: relative; 
}
.aus-form:focus, 
.aus-form:focus-within { 
  outline: none !important; 
  box-shadow: none !important; 
}

/* Controls row: input, select2, button */
.aus-row {
  display: grid;
  grid-template-columns: 1fr 260px 120px;
  gap: 10px;
}
@media (max-width: 640px){
  .aus-row { grid-template-columns: 1fr; }
}

/* prevent children from overflowing their grid columns */
.aus-row > * { min-width: 0; }

/* Text input */
.aus-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 2px solid #ddd;
  border-radius: 10px !important;
  background: #fff;
  font-size: 16px;
  outline: 0;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.aus-wrap .aus-input:focus,
.aus-wrap .aus-input:focus-visible {
  border-color: #007089 !important;
  box-shadow: 0 0 0 3px rgba(0,112,137,.15) !important;
  outline: none !important;
}

/* Select2 dropdown */
.select2-container { 
  width: 100% !important; 
  min-width: 0;               /* don't push into the button column */
}
.aus-wrap .select2-container--default .select2-selection--single {
  height: 48px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background-color: #fff;
  font-size: 16px;
}
.aus-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 44px;
  padding-left: 12px;
  padding-right: 32px;
  color: #111;
}
.aus-wrap .select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px;
  right: 8px;
}
.aus-wrap .select2-container--default.select2-container--focus .select2-selection--single,
.aus-wrap .select2-container--default .select2-selection--single:focus {
  border-color: #007089 !important;
  box-shadow: 0 0 0 3px rgba(0,112,137,.15) !important;
  outline: none !important;
}

/* Search button */
.aus-btn {
  height: 48px;
  padding: 0 20px;
  border: 2px solid #007089;
  border-radius: 10px;
  background: #007089;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  /* robust centering, avoids text clipping */
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  z-index: 1;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.aus-btn:hover {
  background: #CD982C;       /* warm gold background */
  border-color: #CF9A2C;     /* gold border color on hover */
}
.aus-btn:focus,
.aus-btn:focus-visible {
  outline: none;
  border-color: #007089;
  box-shadow: 0 0 0 3px rgba(0,112,137,.15);
}
.aus-row > .aus-btn {
  width: 100%;
  align-self: stretch;
}

/* Status text */
.aus-status { 
  min-height: 20px; 
  margin: 8px 0 12px; 
  font-size: 14px; 
  color: #555; 
}

/* Results grid */
.aus-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
@media (max-width: 480px){
  .aus-results { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

/* Card */
.aus-card {
  display: block;
  border: 1px solid #eee;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  background: #fff;
  transition: transform .08s ease, box-shadow .08s ease;
}
.aus-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}

/* Thumbnail (natural image size, centered, white background) */
.aus-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff; /* white background */
  padding: 8px;
}
.aus-thumb img {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
}

/* Title & subtext */
.aus-title {
  padding: 10px 12px;
  font-weight: 600;
  color: #111;
  text-align: center;
}
.aus-sub {
  padding: 0 12px 12px;
  color: #666;
  font-size: 13px;
  text-align: center;
}

/* Load more */
.aus-more-wrap { display:flex; justify-content:center; margin-top:25px; }
.aus-load-more {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #007089;
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.aus-load-more .aus-label { display:inline-block; color:inherit; }
.aus-load-more .aus-spinner {
  display: none;
  width: 1em; height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: aus-spin .8s linear infinite;
}
.aus-load-more.is-loading .aus-spinner { display:inline-block; }
.aus-load-more:hover { background:#CD982C; color:#fff; }

@keyframes aus-spin { from { transform:rotate(0) } to { transform:rotate(360deg) } }

@media (prefers-reduced-motion: reduce){
  .aus-card { transition: none; }
  .aus-load-more .aus-spinner { animation: none; }
}

/* Hide thumbs when showImages=false via embedded config */
.aus-wrap[data-aus*='"showImages":false'] .aus-thumb { display:none; }

/* Small screens */
@media (max-width: 640px){
  .aus-wrap .select2-container--default .select2-selection--single {
    height: 48px;
  }
  .aus-wrap .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 44px;
  }
}

/* === Uniform control height/radius fix === */
.aus-wrap{
  --aus-control-h: 48px;         /* one place to change height */
  --aus-control-r: 10px;         /* one place to change radius */
}

/* Input: exact height + padding normalized */
.aus-input{
  height: var(--aus-control-h) !important;
  padding: 0 14px !important;    /* vertical padding 0 so height is precise */
  border-radius: var(--aus-control-r) !important;
  line-height: normal;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

/* Select2: match height/arrow/line-height exactly */
.aus-wrap .select2-container--default .select2-selection--single{
  height: var(--aus-control-h) !important;
  border-radius: var(--aus-control-r) !important;
  box-sizing: border-box;
}
.aus-wrap .select2-container--default .select2-selection--single .select2-selection__rendered{
  line-height: calc(var(--aus-control-h) - 4px) !important; /* subtract borders */
  padding-left: 12px;
  padding-right: 32px;
}
.aus-wrap .select2-container--default .select2-selection--single .select2-selection__arrow{
  height: calc(var(--aus-control-h) - 2px) !important;
}

/* Button: same height/radius; flex centers text perfectly */
.aus-btn{
  height: var(--aus-control-h) !important;
  border-radius: var(--aus-control-r) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Safety: prevent any overflow that could nudge heights */
.aus-row > * { min-width: 0; }
.select2-container { min-width: 0; }
