/* FR-394: the dashboard's "Organization profile" (views/pages/org-profile.ejs).
   Only the main theme's elements (docs/site-style.md, «Эталон»): theme inputs and labels,
   button.button (Save), button.button.border (Cancel, Remove, ×), a.button.border (+ Add,
   Upload new), .notification.*; the panel is the theme's card (white, radius 4, shadow
   0 0 12px rgba(0,0,0,.08)); the field error is the decided red 13px #C62828 with the
   field's border; the «×» of a row is the neutral button as a 44 px circle. */

.fpop {
    max-width: 860px;
    padding-bottom: 40px;
}
.fpop [hidden] {
    display: none !important;
}

.fpop-panel {
    margin: 0 0 24px;
    padding: 25px 30px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(0, 0, 0, .08);
}
.fpop-panel h4 {
    margin: 0 0 15px;
}

.fpop-rows {
    display: grid;
    grid-template-columns: minmax(140px, max-content) 1fr;
    gap: 6px 20px;
    margin: 0 0 10px;
}
.fpop-rows dt {
    font-weight: 700;
}
.fpop-rows dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.fpop-note,
.fpop-shown {
    margin: 10px 0 0;
}
/* UI-S-08: the address the page is shown on is a link: the theme's link blue, as the buttons' */
.fpop-shown a {
    color: #01B9FF;
}
/* UI-S-10: a read-only value of several lines (the admin contact: name, e-mail, phone) and the grey note under a phone */
.fpop-rows dd .fpop-line {
    margin: 0 0 4px;
}
.fpop-rows dd .fpop-line:last-child {
    margin-bottom: 0;
}
.fpop-phone-hint {
    display: block;
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #777;
}

.fpop-field {
    margin: 0 0 26px;
}
.fpop-field:last-child {
    margin-bottom: 0;
}
.fpop .fpop-label {
    font-weight: 700;
    margin-bottom: 8px;
}
.fpop-value {
    margin: 0 0 6px;
    overflow-wrap: anywhere;
}
.fpop-hint {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
}
.fpop-warn {
    margin: -6px 0 12px;
    font-size: 13px;
    line-height: 1.4;
}

/* a value of a list: the theme field and its «×» */
.fpop-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
}
.fpop-row > input,
.fpop-row > .iti {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}
.fpop-row .iti input {
    margin: 0;
}
.fpop-row .iti {
    width: 100%;
}
.fpop .fpop-remove {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    font-size: 22px;
    line-height: 42px;
    text-align: center;
}
.fpop .fpop-remove:hover {
    background: transparent;
    color: #66676B;
    border-color: #66676B;
}
.fpop-pinned {
    flex: 1 1 auto;
    min-width: 0;
}
.fpop-pinned input {
    margin: 0;
}
.fpop-pinned small {
    display: block;
    margin: 4px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: #777;
}
/* UI-S-11: a locked field looks the same in every kind of input: the theme's disabled grey (style.css «input[type=text][disabled]»)
   is only for type=text, an e-mail, phone or link field stayed white (the address block keeps its own, FR-393) */
.fpop .fpop-fields input:disabled {
    background-color: #f7f7f7;
}
/* UI-S-07: the search box of the address block is locked after a pick: a locked field has no error frame */
.fpop .fpab .fpc-field.has-error input:disabled {
    border-color: #E5E5E5;
}

.fpop .fpop-add {
    margin: 0;
}

.fpop-logo {
    margin: 0 0 12px;
}
.fpop-logo-img {
    display: block;
    max-width: 160px;
    max-height: 160px;
}
.fpop-logo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.fpop-logo-actions .button {
    margin: 0;
}

/* an error under its field (docs/site-style.md, «Ошибка у поля») */
.fpop .apply-field-error,
.fpop .fpop-field-error {
    display: block;
    margin: 4px 0 0;
    font-size: 13px;
    font-style: normal;
    line-height: 1.4;
    color: #C62828;
}
.fpop .has-error,
.fpop .has-error:focus {
    border-color: #C62828;
}

.fpop .notification {
    margin: 0 0 20px;
}
.fpop .notification p {
    margin: 0;
}
.fpop .notification p + p {
    margin-top: 6px;
}
.fpop-load-error .button,
.fpop-error .button {
    margin: 12px 0 0;
}
/* UI-S-09: the end of a save is scrolled into view below the sticky header */
.fpop-done,
.fpop-error {
    scroll-margin: 90px 0;
}

.fpop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.fpop-actions .button {
    margin: 0;
}
/* UI-S-19: the theme floats `.notification a.button` to the right; the sign-in line holds its own float,
   else on a phone the sign-in button rises above the Try again button, out of its line */
.fpop-signin {
    display: flow-root;
}

/* FR-448: the request that waits for support's approval, and the decision on the last one */
.fpop-pending .button,
.fpop-decision .button {
    margin: 10px 0 0;
}
.fpop-pending .fpop-note {
    margin: 0 0 10px;
}
.fpop-pending-rows dd {
    white-space: pre-line;
}
.fpop-approval-hint {
    margin: 0 0 8px;
}

@media (max-width: 767px) {
    .fpop-panel {
        padding: 20px 16px;
    }
    .fpop-rows {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    .fpop-rows dd {
        margin-bottom: 8px;
    }
    /* Save above Cancel, each the width of the column */
    .fpop-actions {
        flex-direction: column;
    }
    .fpop-actions .button,
    .fpop-pending .button,
    .fpop-decision .button {
        width: 100%;
    }
}
