/* ── Feedback dialog — compact sheet (SaveStock / UpsertRatio shape) ──
   Centred title bar · one inset field group · inline text actions.
   Tokens only (no hex) so it themes in light + dark on every head.
   Linked by the web host (App.razor) AND the MAUI head (index.html). */

.ij-feedback-dialog.mud-dialog {
    border-radius: 20px !important;
    overflow: hidden;
    /* Design width on desktop; never past the viewport on a 375px phone. */
    min-width: 0;
    width: min(380px, calc(100vw - 32px));
    max-width: 380px;
}

.ij-feedback-dialog .mud-dialog-content {
    padding: 0 !important;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ij-feedback-dialog .mud-dialog-content::-webkit-scrollbar {
    display: none;
}

/* ── Top bar ── */
.ij-feedback-top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 20px 14px;
    border-bottom: 0.5px solid var(--ij-divider, var(--mud-palette-divider));
}

.ij-feedback-title {
    font-size: var(--ij-ts-title3, 17px);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ij-text-primary, var(--mud-palette-text-primary));
}

/* ── Body ── */
.ij-feedback-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px 14px;
}

/* Two labels share a ~300px track on a phone ("Commentaires généraux" is the
   long one): one line each, at the footnote size, tighter than the shared
   control's 16px side padding. Scoped here — the segmented control itself is
   untouched. */
.ij-feedback-dialog .ij-segmented-btn {
    padding: 7px 6px;
    font-size: var(--ij-ts-footnote, 13px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Inset field group (iOS grouped-list card) ── */
.ij-feedback-group {
    background: rgba(120, 120, 128, 0.12);
    border-radius: 12px;
    overflow: hidden;
}

.ij-feedback-row {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 4px 14px;
}

.ij-feedback-row + .ij-feedback-row {
    border-top: 0.5px solid var(--ij-divider, var(--mud-palette-divider));
}

/* Fields: a bare input on the card — no underline, no reserved helper line. */
.ij-feedback-field {
    flex: 1;
    min-width: 0;
}

.ij-feedback-field .mud-input-control {
    margin: 0 !important;
    padding: 0 !important;
    min-height: unset !important;
}

.ij-feedback-field .mud-input-root {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.ij-feedback-field .mud-input::before,
.ij-feedback-field .mud-input::after {
    display: none !important;
}

.ij-feedback-field .mud-input-helper-text {
    display: none !important;
}

.ij-feedback-field input,
.ij-feedback-field textarea {
    font-size: var(--ij-ts-body, 15px);
    color: var(--ij-text-primary, var(--mud-palette-text-primary));
    padding: 0 !important;
}

.ij-feedback-field input {
    height: auto !important;
    min-height: unset !important;
}

.ij-feedback-field input::placeholder,
.ij-feedback-field textarea::placeholder {
    color: var(--ij-text-tertiary, var(--mud-palette-text-secondary));
    opacity: 1;
}

.ij-feedback-field--ticker input {
    text-transform: uppercase;
}

.ij-feedback-field--description textarea {
    resize: none;
    line-height: 1.4;
    padding: 6px 0 !important;
}

.ij-feedback-error {
    margin: 0;
}

/* ── Footer — inline text actions, never a filled button ── */
.ij-feedback-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 20px;
    border-top: 0.5px solid var(--ij-divider, var(--mud-palette-divider));
}

.ij-feedback-btn-cancel,
.ij-feedback-btn-send {
    position: relative;
    background: none;
    border: none;
    padding: 4px 0;
    font-family: inherit;
    font-size: var(--ij-ts-body, 15px);
    cursor: pointer;
    transition: opacity var(--ij-duration-instant) var(--ij-ease-standard);
}

/* 44pt touch target without moving the glyph (see HIT TARGETS in app-layout.css). */
.ij-feedback-btn-cancel::after,
.ij-feedback-btn-send::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 44px;
}

.ij-feedback-btn-cancel {
    font-weight: 400;
    color: var(--ij-text-secondary, var(--mud-palette-text-secondary));
}

.ij-feedback-btn-send {
    font-weight: 600;
    color: var(--mud-palette-primary);
}

.ij-feedback-btn-cancel:hover,
.ij-feedback-btn-send:hover:not(:disabled) {
    opacity: 0.7;
}

.ij-feedback-btn-send:disabled {
    color: var(--ij-text-tertiary, var(--mud-palette-text-secondary));
    cursor: default;
}

/* ── Loading / success states ── */
.ij-feedback-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 64px 0;
}

.ij-feedback-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px 32px;
}

.ij-feedback-success-icon {
    font-size: 48px; /* dt-fixed: an icon glyph, not text — the title under it scales */
    color: var(--mud-palette-success);
}

.ij-feedback-success-title {
    font-weight: 600;
    margin-top: 12px;
}
