/** * Copyright since 2025 Mifos Initiative * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ $navy: #0d1b2a; $blue: #1e88e5; $blue-d: #1e40af; $green: #10b981; $red: #ef4444; $amber: #f59e0b; $purple: #7c3aed; :host { display: block; } .ufd-root { background: #fff; width: 720px; max-width: 96vw; max-height: 90vh; display: flex; flex-direction: column; } .ufd-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #e2e8f0; background: linear-gradient(180deg, #f8fafc 0%, #fff 100%); &__left { display: flex; align-items: center; gap: 12px; } &__ic { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: linear-gradient(135deg, $blue 0%, $purple 100%); color: #fff; font-size: 14px; box-shadow: 0 2px 6px -2px rgb(29 78 216 / 35%); } &__title { margin: 0; font-size: 16px; font-weight: 800; color: $navy; line-height: 1.1; } &__sub { margin-top: 2px; font-size: 11.5px; color: #64748b; } } .ufd-x { width: 32px; height: 32px; border-radius: 999px; border: 1px solid #e2e8f0; background: #fff; color: #64748b; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; &:hover { background: #fef2f2; color: $red; border-color: #fecaca; } } .ufd-loading { display: flex; align-items: center; gap: 10px; padding: 40px 24px; color: #64748b; font-size: 13px; } .ufd-body { flex: 1; overflow-y: auto; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; } .ufd-section { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 12px 14px; &__title { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: $blue-d; margin-bottom: 10px; } } .ufd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; // A field placed right after the grid (e.g. OTP Delivery Method, which spans full width // and isn't part of the 2-column layout) needs its own breathing room above it. + .ufd-field { margin-top: 12px; } } .ufd-field { display: flex; flex-direction: column; gap: 4px; label { font-size: 11px; font-weight: 600; color: #475569; } input, select { height: 36px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: $navy; font-size: 13px; transition: all 0.12s; &:focus { outline: none; border-color: $blue; box-shadow: 0 0 0 3px rgb(30 136 229 / 14%); } } select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #64748b 50%), linear-gradient(135deg, #64748b 50%, transparent 50%); background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 28px; } } .ufd-input-prefix { display: flex; align-items: stretch; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; overflow: hidden; height: 36px; &:focus-within { border-color: $blue; box-shadow: 0 0 0 3px rgb(30 136 229 / 14%); } .ufd-prefix { display: inline-flex; align-items: center; padding: 0 10px; background: #f1f5f9; color: #475569; font-size: 12px; font-weight: 600; border-right: 1px solid #cbd5e1; } input { flex: 1; border: none; padding: 0 10px; font-size: 13px; outline: none; color: $navy; } } .ufd-err { font-size: 10.5px; color: $red; font-weight: 600; margin-top: 1px; } .ufd-roles { display: flex; flex-wrap: wrap; gap: 7px; } .ufd-role { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; color: #475569; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.12s; fa-icon { font-size: 9px; } &:hover { border-color: #94a3b8; color: $navy; } &.active { background: linear-gradient(135deg, $blue 0%, $blue-d 100%); border-color: $blue-d; color: #fff; box-shadow: 0 1px 4px -1px rgb(30 64 175 / 35%); } } .ufd-check { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: $navy; margin: 4px 0; cursor: pointer; // stylelint-disable-next-line selector-no-qualifying-type input[type='checkbox'] { width: 16px; height: 16px; accent-color: $blue; } } .ufd-otp-methods { display: flex; flex-wrap: wrap; gap: 8px; } .ufd-otp-method { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 1px solid #cbd5e1; background: #fff; border-radius: 999px; color: #475569; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all 0.12s; fa-icon { font-size: 12px; } // stylelint-disable-next-line selector-no-qualifying-type input[type='radio'] { // Visually hidden but still focusable/clickable for accessibility - the pill itself // carries the selected state via .is-selected, matching .ufd-role's pattern. position: absolute; opacity: 0; width: 0; height: 0; } &:hover { border-color: #94a3b8; color: $navy; } &.is-selected { background: rgb(30 136 229 / 12%); border-color: $blue; color: $blue-d; fa-icon { color: $blue; } } } .ufd-hint { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 11.5px; color: #64748b; fa-icon { color: $amber; } } .ufd-server-err { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid #fecaca; background: #fef2f2; border-radius: 8px; color: $red; font-size: 12.5px; font-weight: 600; } .ufd-actions { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid #e2e8f0; margin-top: 4px; padding-top: 14px; } .ufd-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 18px; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s; border: 1px solid transparent; fa-icon { font-size: 11px; } &.ghost { background: #fff; border-color: #d0d5dd; color: #475569; &:hover:not(:disabled) { background: #f8fafc; border-color: #94a3b8; color: $navy; } } &.primary { background: linear-gradient(135deg, $blue 0%, $blue-d 100%); border-color: $blue-d; color: #fff; box-shadow: 0 2px 6px -2px rgb(30 64 175 / 35%); &:hover:not(:disabled) { box-shadow: 0 4px 12px -3px rgb(30 64 175 / 45%); transform: translateY(-1px); } } &:disabled { opacity: 0.55; cursor: not-allowed; } } @media (width <= 600px) { .ufd-grid { grid-template-columns: 1fr; } }