Files
cbsnexora/src/app/current-accounts/current-account-stepper/current-account-digital-step/current-account-digital-step.component.scss
T

211 lines
4.3 KiB
SCSS

/**
* 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/.
*/
$blue: #2563eb;
$blue-light: #eff6ff;
$green: #16a34a;
$green-light: #f0fdf4;
$green-border: #bbf7d0;
$border: #e2e8f0;
$text: #1e293b;
$muted: #64748b;
$gray-bg: #f8fafc;
// ── Wrapper ──────────────────────────────────────────────
.dig-wrapper {
border: 1px solid $border;
border-radius: 14px;
overflow: hidden;
background: #fff;
box-shadow: 0 1px 4px rgb(0 0 0 / 6%);
}
// ── Header ───────────────────────────────────────────────
.dig-header {
display: flex;
align-items: center;
gap: 14px;
padding: 18px 24px;
background: $gray-bg;
border-bottom: 1px solid $border;
&__icon {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 10px;
background: $blue-light;
color: $blue;
font-size: 16px;
flex: 0 0 auto;
}
&__text {
flex: 1;
}
&__title {
margin: 0 0 2px;
font-size: 15px;
font-weight: 700;
color: $text;
}
&__sub {
margin: 0;
font-size: 12px;
color: $muted;
}
&__badge {
flex: 0 0 auto;
padding: 4px 12px;
border-radius: 999px;
background: #dbeafe;
color: $blue;
font-size: 10px;
font-weight: 700;
letter-spacing: 0.06em;
}
}
// ── Grid ─────────────────────────────────────────────────
.dig-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 0;
@media (width <= 960px) {
grid-template-columns: repeat(2, 1fr);
}
@media (width <= 580px) {
grid-template-columns: 1fr;
}
}
// ── Card ─────────────────────────────────────────────────
.dig-card {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 18px;
border-right: 1px solid $border;
border-bottom: 1px solid $border;
background: #fff;
transition: background 0.18s ease;
cursor: pointer;
&:nth-child(3n) {
border-right: none;
}
&--on {
background: $green-light;
.dig-card__icon {
background: $green-border;
color: $green;
}
.dig-card__status {
color: $green;
font-weight: 600;
}
}
&__icon {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 9px;
background: $blue-light;
color: $blue;
font-size: 14px;
flex: 0 0 auto;
transition:
background 0.18s,
color 0.18s;
}
&__body {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
&__label {
font-size: 13px;
font-weight: 600;
color: $text;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
&__status {
font-size: 11px;
color: $muted;
transition: color 0.18s;
}
}
// ── Toggle Switch ─────────────────────────────────────────
.dig-toggle {
position: relative;
flex: 0 0 auto;
cursor: pointer;
input {
position: absolute;
opacity: 0;
width: 0;
height: 0;
&:checked + .dig-toggle__track {
background: $green;
border-color: $green;
}
&:checked + .dig-toggle__track .dig-toggle__thumb {
transform: translateX(18px);
}
}
&__track {
display: block;
width: 40px;
height: 22px;
border-radius: 999px;
background: #cbd5e1;
border: 1.5px solid #94a3b8;
position: relative;
transition:
background 0.2s,
border-color 0.2s;
}
&__thumb {
position: absolute;
top: 2px;
left: 2px;
width: 16px;
height: 16px;
border-radius: 50%;
background: #fff;
box-shadow: 0 1px 3px rgb(0 0 0 / 20%);
transition: transform 0.2s ease;
}
}