/* The address block of the site's forms (views/parts/address-block.ejs, public/scripts/address-block.js).
   FR-393 made it for the microchip certificate window; FR-394 moved it here and put it on the organization profile.
   Decision D-20: the block looks the same everywhere it stands — these are the rules of the certificate window (the block's
   own and the field rules it needs), under the class of the block, .fpab, not under the window's id. A window or page that has the
   block loads this file; the window's own stylesheet (certificate-dlg.css) keeps the same field values for its other fields. */

.fpab {
    --fpc-blue-text: #0077A8;
    --fpc-ink: #212121;
    --fpc-soft: #E8F8FF;
    --fpc-error: #C62828;
    display: flex; flex-direction: column; gap: 12px;
    color: var(--fpc-ink); font-size: 15px; line-height: 1.45;
}

/* hidden wins over the display of the classes below */
.fpab [hidden] { display: none !important; }

/* the fields of the block */
.fpab .fpc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.fpab .fpc-wide { grid-column: 1 / -1; }
.fpab .fpc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fpab .fpc-field > label { margin: 0; font-size: 13px; font-weight: 600; color: #444444; }
.fpab .fpc-field input:not([type="checkbox"]):not([type="radio"]), .fpab .fpc-field select {
    width: 100%; height: 44px; margin: 0; padding: 0 15px; border: 1px solid #DBDBDB; border-radius: 20px; background: #FFFFFF;
    font-size: 15px; color: var(--fpc-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.fpab .fpc-field input:not([type="checkbox"]):not([type="radio"]):focus, .fpab .fpc-field select:focus { border-color: #D8D8D8; outline: none; box-shadow: 0 0 10px rgba(0, 0, 0, .07); }
.fpab .fpc-field small { font-size: 12px; color: #777777; }
/* a locked part looks as a read-only field */
.fpab .fpc-field input:not([type="checkbox"]):not([type="radio"]):disabled, .fpab .fpc-field select:disabled { border-color: #E5E5E5; background: #F2F2F2; color: #555555; cursor: default; box-shadow: none; }
.fpab .fpc-field.has-error input:not([type="checkbox"]):not([type="radio"]), .fpab .fpc-field.has-error select { border-color: var(--fpc-error); }
.fpab .fpc-field-error { font-size: 12px; color: var(--fpc-error); }

/* FR-297 (D-68): the saved one-line address that did not read into the parts */
.fpab .fpc-saved-address { margin: 0; font-size: 14px; color: var(--fpc-ink); background: var(--fpc-soft); border-radius: 8px; padding: 8px 12px; overflow-wrap: anywhere; }

/* FR-393: the search, the lock, the summary, the folded parts (the cs-admin standard, FR-403) */
.fpab .fpc-address { display: flex; flex-direction: column; gap: 8px; }
.fpab .fpc-addr-lock, .fpab .fpc-addr-summary, .fpab .fpc-addr-unpicked { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.fpab .fpc-addr-lock, .fpab .fpc-addr-summary { color: var(--fpc-ink); background: var(--fpc-soft); border-radius: 8px; padding: 8px 12px; }
.fpab .fpc-addr-unpicked { color: var(--fpc-error); }
.fpab .fpc-addr-lock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.fpab .fpc-link { background: none; border: 0; padding: 0; color: var(--fpc-blue-text); text-decoration: underline; cursor: pointer; font: inherit; }
.fpab .fpc-addr-toggle { align-self: flex-start; font-size: 14px; }
.fpab .fpc-address .fpc-grid { margin: 0; }

@media (max-width: 600px) {
    .fpab .fpc-grid { grid-template-columns: minmax(0, 1fr); }
}
