.request-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgb(15 23 42 / 0.55);
    backdrop-filter: blur(4px);
}

.request-modal.is-open {
    display: flex;
}

.request-modal__panel {
    position: relative;
    width: 100%;
    max-width: 28rem;
    max-height: min(92vh, 640px);
    overflow: auto;
    border-radius: 1rem;
    background: #fff;
    box-shadow:
        0 24px 48px rgb(15 23 42 / 0.2),
        0 0 0 1px rgb(226 232 240);
}

.request-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid rgb(241 245 249);
    background: linear-gradient(180deg, rgb(239 246 255) 0%, #fff 100%);
}

.request-modal__header-text {
    min-width: 0;
}

.request-modal__title {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 800;
    line-height: 1.45;
    color: rgb(15 23 42);
}

.request-modal__subtitle {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.7;
    color: rgb(100 116 139);
}

.request-modal__close {
    display: flex;
    height: 2.25rem;
    width: 2.25rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 9999px;
    background: rgb(241 245 249);
    color: rgb(71 85 105);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.request-modal__close:hover {
    background: rgb(254 226 226);
    color: rgb(220 38 38);
}

.request-modal__close svg {
    height: 1.125rem;
    width: 1.125rem;
}

.request-modal__body {
    padding: 1rem 1.25rem 1.25rem;
}

.request-modal__field {
    margin-bottom: 0.875rem;
}

.request-modal__label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgb(51 65 85);
}

.request-modal__label--optional {
    font-weight: 500;
    color: rgb(100 116 139);
}

.request-modal__input,
.request-modal__select {
    width: 100%;
    border: 1px solid rgb(203 213 225);
    border-radius: 0.625rem;
    background: rgb(248 250 252);
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(15 23 42);
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.request-modal__input::placeholder {
    color: rgb(148 163 184);
    font-weight: 500;
}

.request-modal__input:focus,
.request-modal__select:focus {
    border-color: rgb(59 130 246);
    background: #fff;
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.15);
}

.request-modal__input--error {
    border-color: rgb(239 68 68);
    box-shadow: 0 0 0 3px rgb(239 68 68 / 0.12);
}

.request-modal__select-wrap {
    position: relative;
}

.request-modal__select {
    appearance: none;
    padding-inline-start: 0.75rem;
    padding-inline-end: 2.25rem;
    cursor: pointer;
}

.request-modal__select-icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.75rem;
    display: flex;
    pointer-events: none;
    color: rgb(100 116 139);
    transform: translateY(-50%);
}

.request-modal__select-icon svg {
    height: 1rem;
    width: 1rem;
}

.request-modal__error {
    margin: 0.375rem 0 0;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
    color: rgb(220 38 38);
}

.request-modal__error.hidden {
    display: none;
}

.request-modal__submit {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
    border: none;
    border-radius: 0.625rem;
    background: linear-gradient(145deg, rgb(59 130 246) 0%, rgb(37 99 235) 100%);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 20px rgb(37 99 235 / 0.28);
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.request-modal__submit:hover:not(:disabled) {
    box-shadow: 0 10px 24px rgb(37 99 235 / 0.35);
    transform: translateY(-1px);
}

.request-modal__submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.request-modal__state {
    padding: 1.25rem;
}

.request-modal__state--success {
    border-radius: 0.75rem;
    background: rgb(240 253 244);
    border: 1px solid rgb(187 247 208);
    color: rgb(21 128 61);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.75;
    text-align: justify;
}

.request-modal__state--danger {
    border-radius: 0.75rem;
    background: rgb(254 242 242);
    border: 1px solid rgb(254 202 202);
    color: rgb(185 28 28);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.75;
    text-align: justify;
}

.request-modal__state--danger a {
    color: rgb(37 99 235);
    text-decoration: underline;
}

.request-modal__retry {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    margin-top: 0.875rem;
    border: none;
    border-radius: 0.625rem;
    background: rgb(241 245 249);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: rgb(51 65 85);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.request-modal__retry:hover {
    background: rgb(226 232 240);
}
