:root {
    --gd-feedback-accent: #087da8;
    --gd-feedback-soft: #e8f6fb;
    --gd-feedback-ink: #10243d;
}

body.gd-feedback-open {
    overflow: hidden;
}

.gd-feedback-modal[hidden] {
    display: none !important;
}

.gd-feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    transition: opacity 180ms ease;
}

.gd-feedback-modal.is-visible {
    opacity: 1;
}

.gd-feedback-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 23, 42, .54);
    backdrop-filter: blur(5px);
}

.gd-feedback-card {
    position: relative;
    width: min(100%, 510px);
    overflow: hidden;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, .34);
    border-radius: 20px;
    background: #fff;
    color: var(--gd-feedback-ink);
    box-shadow: 0 28px 80px rgba(2, 18, 35, .26), 0 4px 18px rgba(2, 18, 35, .12);
    transform: translateY(12px) scale(.985);
    transition: transform 180ms ease;
}

.gd-feedback-modal.is-visible .gd-feedback-card {
    transform: translateY(0) scale(1);
}

.gd-feedback-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #dce6ec;
    border-radius: 10px;
    background: #f8fbfc;
    color: #5f7185;
    font: 500 24px/1 Arial, sans-serif;
    cursor: pointer;
}

.gd-feedback-heading {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 15px;
    align-items: center;
    padding-right: 32px;
}

.gd-feedback-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--gd-feedback-soft);
    color: var(--gd-feedback-accent);
    font: 800 27px/1 "Outfit", "Inter", sans-serif;
}

.gd-feedback-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--gd-feedback-accent);
    font: 700 11px/1.2 "Inter", sans-serif;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.gd-feedback-card h2 {
    margin: 0;
    color: var(--gd-feedback-ink);
    font: 750 22px/1.24 "Outfit", "Inter", sans-serif;
}

.gd-feedback-message {
    margin: 20px 0 24px;
    color: #40556d;
    font: 450 15px/1.65 "Inter", sans-serif;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.gd-feedback-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.gd-feedback-button {
    min-height: 43px;
    padding: 10px 18px;
    border-radius: 11px;
    font: 700 14px/1 "Inter", sans-serif;
    cursor: pointer;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.gd-feedback-button:hover {
    transform: translateY(-1px);
}

.gd-feedback-button:focus-visible,
.gd-feedback-close:focus-visible {
    outline: 3px solid rgba(8, 125, 168, .24);
    outline-offset: 2px;
}

.gd-feedback-button-primary {
    border: 1px solid var(--gd-feedback-accent);
    background: var(--gd-feedback-accent);
    color: #fff;
    box-shadow: 0 8px 20px rgba(8, 125, 168, .2);
}

.gd-feedback-button-secondary {
    border: 1px solid #cbd9e2;
    background: #fff;
    color: #40556d;
}

.gd-feedback-button.is-danger {
    border-color: #c63838;
    background: #c63838;
    box-shadow: 0 8px 20px rgba(198, 56, 56, .2);
}

.gd-feedback-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--gd-feedback-accent);
    transform-origin: left;
    animation-name: gd-feedback-countdown;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
}

.gd-feedback-progress[hidden] {
    display: none;
}

.gd-feedback-modal[data-type="success"] {
    --gd-feedback-accent: #16815b;
    --gd-feedback-soft: #e8f7f0;
}

.gd-feedback-modal[data-type="warning"] {
    --gd-feedback-accent: #b36500;
    --gd-feedback-soft: #fff4dd;
}

.gd-feedback-modal[data-type="error"] {
    --gd-feedback-accent: #c63838;
    --gd-feedback-soft: #ffeded;
}

.gd-feedback-modal[data-kind="confirm"] .gd-feedback-message {
    margin-bottom: 26px;
}

.gd-form-submitting .gd-submit-admitted {
    cursor: wait !important;
    pointer-events: none;
}

@keyframes gd-feedback-countdown {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 600px) {
    .gd-feedback-modal {
        padding: 16px;
    }
    .gd-feedback-card {
        padding: 24px 20px 20px;
        border-radius: 17px;
    }
    .gd-feedback-heading {
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 12px;
    }
    .gd-feedback-icon {
        width: 46px;
        height: 46px;
        border-radius: 14px;
        font-size: 24px;
    }
    .gd-feedback-card h2 {
        font-size: 20px;
    }
    .gd-feedback-actions {
        flex-direction: column-reverse;
    }
    .gd-feedback-button {
        width: 100%;
    }
}

html[data-theme="dark"] .gd-feedback-card {
    border-color: rgba(148, 163, 184, .24);
    background: #122236;
    color: #edf5fa;
}

html[data-theme="dark"] .gd-feedback-card h2 {
    color: #f7fbfd;
}

html[data-theme="dark"] .gd-feedback-message {
    color: #c0cfda;
}

html[data-theme="dark"] .gd-feedback-close,
html[data-theme="dark"] .gd-feedback-button-secondary {
    border-color: #344a60;
    background: #192d43;
    color: #dce8ef;
}

@media (prefers-reduced-motion: reduce) {
    .gd-feedback-modal,
    .gd-feedback-card,
    .gd-feedback-button {
        transition: none;
    }
    .gd-feedback-progress {
        animation: none;
    }
}
