/* ==========================================================================
   Advanced search page (/search/)

   Almost nothing of its own: the page is built from the classes the site
   already has - .amd-qs-select and .amd-qs-price-input for the controls,
   .amd-qs-btn for the buttons, .amd-lastads-* for the result cards and
   their headers. What is left here is only the layout of the form rows.
   ========================================================================== */

/* ---- outer block: same geometry as #amd-qsearch-section ---- */
.amd-sa-section,
.amd-sa-block {
    width: 100%;
    max-width: 1440px;
    margin: 6px auto;
    box-sizing: border-box;
    background-color: transparent;
}

/* heading strip: same as #amd-qsearch-heading */
.amd-sa-heading {
    display: flex;
    align-items: center;
    padding: 8px 10px 8px 20px;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.18);
    min-height: 40px;
    transition: background-color 0.25s ease;
}

.amd-sa-section:hover .amd-sa-heading { background-color: rgba(255, 255, 255, 0.26); }

/* title: exactly h2.amd-qsearch-title of the quick search block */
.amd-sa-title {
    margin: 0;
    padding: 0;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 16px;
    font-weight: bold;
    color: #d8d8d8;
}

/* the form panel: same as #amd-qsearch-inner */
.amd-sa-inner {
    width: 100%;
    box-sizing: border-box;
    background-color: rgba(255, 255, 255, 0.65);
    transition: background-color 0.25s ease;
}

.amd-sa-section:hover .amd-sa-inner { background-color: rgba(255, 255, 255, 1); }

/* ---- form rows ---- */
.amd-sa-form {
    padding: 8px 14px 10px 20px;
    box-sizing: border-box;
}

.amd-sa-row {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.amd-sa-row:first-child { margin-top: 0; }

.amd-sa-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 120px;
}

/* the section picker stands first and keeps its own width */
.amd-sa-field--sec { flex: 0 0 210px; }

.amd-sa-field--q { flex: 3; min-width: 220px; }

/* label above a control - same font as .amd-qs-price-label */
.amd-sa-label {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 12px;
    color: #343840;
    white-space: nowrap;
    margin-bottom: 3px;
}

/* text input - same look as .amd-qs-price-input */
.amd-sa-text {
    width: 100%;
    height: 30px;
    background-color: #d8d8d8;
    border: 1px solid #b0b0b0;
    border-radius: 4px;
    outline: none;
    padding: 0 8px;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 13px;
    color: #333333;
    box-sizing: border-box;
    transition: border-color 0.2s, background-color 0.2s;
}

.amd-sa-text:hover,
.amd-sa-text:focus { border-color: #888888; background-color: #cecece; }

.amd-sa-text::placeholder { color: #999999; }

.amd-sa-pair { display: flex; gap: 6px; }

.amd-sa-btns {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
}

/* reset is the quiet one on the left, search is bold on the right */
.amd-sa-btn-reset { width: 100px; }
.amd-sa-btn-reset span { font-weight: normal; }
.amd-sa-btn-find span { font-weight: bold; }

/* the shortcuts moved here from the quick search block */
.amd-sa-hotlinks {
    padding: 10px 0 2px 0 !important;
}

/* ---- results: the cards carry their own styles ---- */
.amd-sa-block .amd-lastads-items { background-color: rgba(255, 255, 255, 0.06); }

.amd-sa-hint {
    font-family: Tahoma, Arial, sans-serif;
    font-size: 13px;
    color: #343840;
    background-color: rgba(255, 255, 255, 0.65);
    margin: 0;
    padding: 14px 20px;
}

/* ---- phone ---- */
@media (max-width: 760px) {
    .amd-sa-form { padding: 8px 10px 10px 12px; }
    .amd-sa-heading { padding-left: 12px; }
    .amd-sa-field, .amd-sa-field--q { flex: 1 1 100%; min-width: 0; }
    .amd-sa-btns { margin-left: 0; width: 100%; }
    .amd-sa-btns .amd-qs-btn { flex: 1; width: auto; }
}
