/* Dashboard hero and subject shortcuts. Loaded after the density overrides. */
.dsh-profile-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #d7dcff;
    border-radius: 30px;
    background: linear-gradient(90deg, #2394ef 0%, #3877ec 47%, #7b63eb 78%, #ca6be2 100%);
    box-shadow: none;
}

/* Let the practice background fill the height shared with the right panel. */
.dsh-profile-card .dsh-profile-grid {
    flex: 1;
    grid-template-rows: auto auto minmax(0, 1fr);
    align-items: stretch;
}

.dsh-profile-body {
    display: flex;
    overflow: hidden;
}

.dsh-profile-body .dsh-premium-exact {
    flex: 1;
    min-width: 0;
}

.dsh-profile-top--compact {
    border-radius: 29px 29px 0 0;
    background:
        radial-gradient(ellipse at 84% 76%, rgba(28, 90, 255, 0.55), transparent 32%),
        linear-gradient(115deg, #03007c 0%, #090089 60%, #2411aa 100%);
}

.dsh-profile-shooting-star {
    position: absolute;
    right: 1%;
    bottom: 0;
    width: 37%;
    height: 100%;
    pointer-events: none;
}

.dsh-profile-body,
.dsh-profile-body .dsh-premium-exact {
    border-radius: 0 0 29px 29px;
}

.dsh-dashboard-feature-panel {
    padding: 12px 15px;
    border-radius: 32px;
    border-color: #d5caff;
    box-shadow: none;
}

.dsh-feature-stack {
    grid-template-rows: auto auto 1fr;
    gap: 9px;
}

.dsh-feature-section-label {
    color: #3930a4;
    font-size: clamp(1rem, 1.25vw, 1.3rem);
    letter-spacing: 0.045em;
}

.dsh-practice-shortcuts {
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: 10px;
    padding-block: 5px 2px;
}

.dsh-practice-shortcut {
    --dsh-subject-text: #003d91;
    --dsh-subject-edge: #21baf2;
    --dsh-subject-divider: #009fed;
    --dsh-subject-wave: #24c8ed;
    --dsh-subject-glow: rgba(54, 153, 255, 0.48);
    --dsh-subject-surface: linear-gradient(150deg, #f1fbff 0%, #d7efff 56%, #b6e9fc 100%);
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 0.29fr) minmax(0, 0.71fr);
    align-items: center;
    gap: 0;
    min-width: 0;
    min-height: clamp(46px, 14cqw, 68px);
    padding: 3px 4px 3px 3px;
    border: 1px solid var(--dsh-subject-edge);
    border-bottom-width: 3px;
    border-radius: clamp(14px, 4.6cqw, 24px);
    background:
        radial-gradient(ellipse at 14% 0%, #ffffffdd, transparent 55%),
        var(--dsh-subject-surface);
    color: var(--dsh-subject-text);
    box-shadow: none;
    font-family: "Inter", Arial, sans-serif;
    font-size: clamp(11px, 3.55cqw, 17px);
    font-weight: 800;
    line-height: 1.12;
    text-decoration: none;
    text-align: left;
    transform: none;
}

.dsh-practice-shortcut::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    border-radius: inherit;
    background: var(--dsh-subject-wave);
    -webkit-mask: url("../images/dashboard-subjects/shortcut-waves.svg") center / 100% 100% no-repeat;
    mask: url("../images/dashboard-subjects/shortcut-waves.svg") center / 100% 100% no-repeat;
    pointer-events: none;
}

.dsh-practice-shortcut::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 1px;
    border: 1px solid #ffffffb8;
    border-radius: inherit;
    background-image:
        linear-gradient(110deg, transparent 43%, #ffffffa6 50%, transparent 57%),
        linear-gradient(152deg, transparent 68%, #ffffff47 69%, transparent 76%);
    background-size: 250% 100%, 100% 100%;
    background-position: 160% 0, 0 0;
    background-repeat: no-repeat;
    pointer-events: none;
}

.dsh-practice-shortcut--financial {
    --dsh-subject-text: #7a3509;
    --dsh-subject-edge: #ffad17;
    --dsh-subject-divider: #ef941e;
    --dsh-subject-wave: #ffc42b;
    --dsh-subject-glow: rgba(255, 178, 31, 0.5);
    --dsh-subject-surface: linear-gradient(150deg, #fffdf5 0%, #fff0d5 56%, #ffdfa0 100%);
}

.dsh-practice-shortcut--logic {
    --dsh-subject-text: #3e0788;
    --dsh-subject-edge: #af72ff;
    --dsh-subject-divider: #bd73f0;
    --dsh-subject-wave: #bd77f1;
    --dsh-subject-glow: rgba(180, 74, 247, 0.45);
    --dsh-subject-surface: linear-gradient(150deg, #fcf4ff 0%, #efd9ff 56%, #dfb8fb 100%);
}

.dsh-practice-shortcut-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 0 4px 0 1px;
    border-right: 1px solid var(--dsh-subject-divider);
}

.dsh-practice-shortcut-icon img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    max-width: 38px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.dsh-practice-shortcut-icon::after {
    content: "";
    position: absolute;
    top: -5px;
    right: 12%;
    width: 11px;
    height: 10px;
    background: var(--dsh-subject-divider);
    -webkit-mask: url("../images/dashboard-subjects/shortcut-sparks.svg") center / contain no-repeat;
    mask: url("../images/dashboard-subjects/shortcut-sparks.svg") center / contain no-repeat;
    pointer-events: none;
}

.dsh-practice-shortcut--spell .dsh-practice-shortcut-icon img {
    width: 94%;
    transform: rotate(-8deg);
}

.dsh-practice-shortcut--financial .dsh-practice-shortcut-icon::before {
    content: "";
    position: absolute;
    right: 14%;
    bottom: -1px;
    width: 72%;
    aspect-ratio: 1;
    border: 1px solid #d38a00;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 25%, #fff49f, #ffcc1a 58%, #d98c00 80%, #ffdc55);
}

.dsh-practice-shortcut-label {
    position: relative;
    z-index: 1;
    min-width: 0;
    padding-left: 5px;
    letter-spacing: -0.04em;
}

.dsh-practice-new {
    position: absolute;
    z-index: 3;
    isolation: isolate;
    top: -5px;
    right: -1px;
    width: clamp(38px, 13.5cqw, 68px);
    height: clamp(16px, 4.3cqw, 22px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 1px 4px 3px 8px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: clamp(8px, 2.6cqw, 11px);
    font-weight: 800;
    font-style: italic;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transform: none;
}

.dsh-practice-new::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -1px -1px -10px -3px;
    background: url("../images/dashboard-subjects/shortcut-new-ribbon.svg") center / 100% 100% no-repeat;
    pointer-events: none;
}

/* The global a:hover rule uses inline-block; retain the two-column card grid. */
.dsh-practice-shortcut:hover,
.dsh-practice-shortcut:focus,
.dsh-practice-shortcut:active {
    display: grid;
    color: var(--dsh-subject-text);
    text-decoration: none;
    transform: none;
}

.dsh-practice-shortcut:focus-visible {
    outline: 3px solid #6652db;
    outline-offset: 4px;
}

@keyframes dsh-subject-shine {
    from { background-position: 160% 0, 0 0; }
    to { background-position: -110% 0, 0 0; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .dsh-practice-shortcut:hover::after,
    .dsh-practice-shortcut:focus-visible::after {
        animation: dsh-subject-shine 0.75s ease-out;
    }
}

.dsh-feature-hero-grid {
    gap: 8px;
    align-content: stretch;
}

.dsh-feature-card {
    padding: 9px 10px 7px;
    gap: 5px;
    border-radius: 28px;
}

.dsh-feature-card::before {
    top: 16px;
    left: 17px;
}

.dsh-feature-hero-grid .dsh-feature-card-media {
    aspect-ratio: 8 / 5;
}

.dsh-feature-card-title {
    font-size: clamp(0.8rem, 1vw, 1.08rem);
    text-align:center;
}

/* Override legacy card, icon and hover shadows only in these dashboard panels. */
.dsh-hero-layout,
.dsh-hero-layout *,
.dsh-hero-layout *::before,
.dsh-hero-layout *::after {
    box-shadow: none !important;
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .dsh-feature-stack {
        grid-template-rows: auto auto auto;
        min-height: 0;
    }

    .dsh-practice-shortcuts {
        width: min(100%, 500px);
        margin-inline: auto;
    }
}

@media (max-width: 767.98px) {
    .dsh-profile-top--compact {
        padding: 12px 10px;
    }

    .dsh-profile-greeting {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 8px;
        align-items: center;
    }

    .dsh-profile-greeting-copy {
        gap: 6px;
    }

    .dsh-profile-title-row {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .dsh-profile-summary .dsh-profile-title-row .dsh-title {
        flex: 0 1 auto;
        min-width: 0;
        font-size: clamp(14px, 4.7vw, 22px);
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        overflow-wrap: normal;
    }

    .dsh-profile-title-row .dsh-profile-chatbot-edit {
        width: 48px;
        height: 34px;
        padding: 0 6px;
        gap: 4px;
    }

    .dsh-profile-chatbot-edit .fa-robot {
        font-size: 14px;
    }

    .dsh-profile-chatbot-edit .fa-pen {
        width: 14px;
        height: 14px;
        font-size: 8px;
    }

    .dsh-profile-avatar-class {
        font-size: 12px;
        line-height: 1.15;
    }

    .dsh-dashboard-feature-panel {
        padding: 16px 12px;
        border-radius: 26px;
    }

    .dsh-feature-stack {
        grid-template-rows: auto auto auto;
        gap: 12px;
        min-height: 0;
    }

    .dsh-practice-shortcuts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .dsh-practice-shortcuts .dsh-practice-shortcut {
        min-height: 46px;
        padding: 4px 3px;
        font-size: clamp(10px, 3.4cqw, 13px);
        line-height: 1.15;
    }

    .dsh-practice-shortcuts .dsh-practice-shortcut-icon {
        padding-right: 3px;
    }

    .dsh-practice-shortcut-label {
        padding-left: 3px;
    }

    .dsh-profile-shooting-star {
        display: none;
    }

    .dsh-feature-mobile-swiper .dsh-feature-card-title {
        font-size: 1rem;
    }

    .dsh-feature-mobile-swiper .dsh-feature-card-media {
        min-height: 128px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dsh-practice-shortcut {
        transition: none;
    }
}

/* Preserve the icon and label together in the narrowest laptop sidebars. */
@container (max-width: 240px) {
    .dsh-practice-shortcuts .dsh-practice-shortcut {
        grid-template-columns: minmax(0, 0.24fr) minmax(0, 0.76fr);
        padding-inline: 2px;
        font-size: 9.5px;
    }

    .dsh-practice-shortcut-icon {
        padding-right: 3px;
    }

    .dsh-practice-shortcut-label {
        padding-left: 3px;
    }
}
