/* ============================================================
   submit.css — Submit form
   Back button and image delete button.
   ============================================================ */

.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0.6rem 0 0.2rem 0.8rem;

  border: 1px solid var(--primary-subtext);
  border-radius: 50%;
  color: var(--primary-textarea);
  background: var(--md-default-bg-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);

  line-height: 1;
  cursor: pointer;
  z-index: 100;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.back-btn:hidden {
  display: none;
}

.back-btn:hover {
  color: #fff;
  background: var(--primary-link);
  border-color: var(--primary-link);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

.back-btn .material-symbols-outlined {
  font-size: 1.3rem;
}

.label-help {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* .pico scopes Pico's conditional button theme; override it here */
.pico .help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--primary-subtext);
    cursor: pointer;
    line-height: 1;
}

.pico .help-btn:hover {
    color: var(--primary-link);
    background: transparent;
}

.pico .help-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

.submit-tile {
    max-width: 720px;
    margin: 0.5rem auto;
    padding: 0.8rem 0.8rem;
    background: var(--md-default-bg-color);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.image-choice {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
}

.file-name {
    font-size: 0.55rem;
    color: var(--primary-textarea);
    
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delete-image-btn {
    cursor: pointer;
    font-size: 1rem;
    color: var(--primary-textarea);
}

.delete-image-btn:hover {
    color: #ccc;
}

/* Address autocomplete (Google Places) */
.address-autocomplete {
    position: relative;
    width: 100%;
    /* flex column kills the inline descender gap below the input */
    display: flex;
    flex-direction: column;
    /* carry the input's spacing here so the panel can hug the input's bottom */
    /* margin-bottom: var(--pico-spacing, 1rem); */
}

.pico .search-address {
    margin-bottom: 0rem;
}

.pico .search-address.looking {
    border-color: var(--primary-link);
    border-bottom-color: transparent;
    border-radius: 10px 10px 0 0;
    box-shadow: none;
    margin-bottom: 0rem;
}

.address-autocomplete .search-address {
    margin-bottom: 0;
}

.address-autocomplete .address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    margin-top: 0;

    display: flex;
    flex-direction: column;

    background: var(--md-default-bg-color);
    border: 1px solid var(--primary-link);
    border-top: none;
    border-radius: 0 0 10px 10px;
    /* box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18); */
    overflow: hidden;
}

.address-autocomplete .address-suggestions.hidden {
    display: none;
}

.address-suggestion {
    padding: 0.55rem 0.9rem;
    font-size: 0.8rem;
    color: var(--primary-textarea);
    cursor: pointer;
}

.address-suggestion:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* === Category multi-select chips === */
.category-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.3rem;
    margin-bottom: 1rem;
}

/* .pico scopes Pico's conditional button theme; override it here */
.pico .category-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: auto;
    padding: 0.2rem 0.6rem;
    margin: 0;
    border: 2px solid var(--chip-color, var(--primary-subtext));
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: var(--primary-textarea);
    font-size: 0.7rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.pico .category-chip .material-symbols-outlined {
    font-size: 1.1rem;
    color: var(--chip-color, var(--primary-subtext));
}

.pico .category-chip:hover {
    background: color-mix(in srgb, var(--chip-color) 12%, transparent);
}

.pico .category-chip.selected {
    background: var(--chip-color);
    border-color: var(--chip-color);
    color: #fff;
}

.pico .category-chip.selected .material-symbols-outlined {
    color: #fff;
}

