// Use theme variables with namespace to avoid conflicts
@use 'variables' as vars;
@use 'mixins' as mix;
// ============================================
// Hikari Alert Component
// Features: Glowing icons, smooth transitions, no static borders
// ============================================
// ============================================
// Base Alert Styles
// ============================================
.hi-alert {
// Layout
display: flex;
align-items: flex-start;
gap: 0.75rem;
// Spacing
padding: 1rem 1.25rem;
// Appearance - Subtle rounded corners, NO static border
border-radius: vars.$hikari-radius-fui-md;
border: none;
// Acrylic background effect (light) - same as Card
background: var(--hi-color-surface);
backdrop-filter: blur(4px);
// Subtle shadow only (same as Card)
box-shadow: 0 1px 3px var(--hi-color-black-10),
0 0 0 1px var(--hi-color-white-15) inset;
// Position
position: relative;
overflow: visible;
// Icon
.hi-alert-icon {
flex-shrink: 0;
width: 1.25rem;
height: 1.25rem;
margin-top: 0.125rem;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
border: 1.5px solid currentColor;
svg {
width: 0.75rem;
height: 0.75rem;
}
}
// Content wrapper
.hi-alert-content {
flex: 1;
min-width: 0;
}
// Title
.hi-alert-title {
margin: 0 0 0.25rem 0;
font-family: vars.$hikari-font-family-sans;
font-size: vars.$hikari-font-size-sm;
font-weight: 600;
color: var(--hi-color-text-primary);
line-height: 1.4;
}
// Description
.hi-alert-description {
margin: 0;
font-family: vars.$hikari-font-family-sans;
font-size: vars.$hikari-font-size-sm;
font-weight: 400;
color: var(--hi-color-text-secondary);
line-height: 1.5;
}
// Close button - simple icon button, glow handled by wrapper
.hi-alert-close {
flex-shrink: 0;
align-self: flex-start;
width: 1.25rem;
height: 1.25rem;
margin: 0;
padding: 0.125rem;
background: transparent;
border: none;
color: var(--hi-color-text-secondary);
cursor: pointer;
border-radius: vars.$hikari-radius-fui-sm;
&:hover {
color: var(--hi-color-danger);
}
svg {
width: 100%;
height: 100%;
display: block;
}
}
// No hover transform or border effects - Glow handled by wrapper
}
// ============================================
// Color Variants - subtle accent only
// ============================================
// Success (Green)
.hi-alert-success {
border-left: 3px solid var(--hi-color-success);
.hi-alert-icon {
color: var(--hi-color-success);
}
}
// Info (Blue)
.hi-alert-info {
border-left: 3px solid var(--hi-color-primary);
.hi-alert-icon {
color: var(--hi-color-primary);
}
}
// Warning (Yellow)
.hi-alert-warning {
border-left: 3px solid var(--hi-color-warning);
.hi-alert-icon {
color: var(--hi-color-warning);
}
}
// Error (Red)
.hi-alert-error {
border-left: 3px solid var(--hi-color-danger);
.hi-alert-icon {
color: var(--hi-color-danger);
}
}
// ============================================
// Variant Types
// ============================================
// Solid variant - uses surface background, glow handled by wrapper
.hi-alert-solid {
// No static gradient - glow effect handled by GlowWrapper
}
// Outlined variant (transparent background, more prominent border)
.hi-alert-outlined {
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
box-shadow: none;
&.hi-alert-success {
border: 2px solid var(--hi-glow-button-success);
border-left-width: 3px;
}
&.hi-alert-info {
border: 2px solid var(--hi-glow-button-info);
border-left-width: 3px;
}
&.hi-alert-warning {
border: 2px solid var(--hi-glow-button-warning);
border-left-width: 3px;
}
&.hi-alert-error {
border: 2px solid var(--hi-glow-button-danger);
border-left-width: 3px;
}
}
// ============================================
// Size Variants
// ============================================
.hi-alert-sm {
padding: 0.75rem 1rem;
.hi-alert-icon {
width: 1rem;
height: 1rem;
}
.hi-alert-title {
font-size: 0.875rem;
}
.hi-alert-description {
font-size: 0.75rem;
}
}
.hi-alert-md {
padding: 1rem 1.25rem;
}
.hi-alert-lg {
padding: 1.25rem 1.5rem;
.hi-alert-icon {
width: 1.5rem;
height: 1.5rem;
}
.hi-alert-title {
font-size: 1rem;
}
.hi-alert-description {
font-size: 0.9375rem;
}
}
// ============================================
// Banner Variant (full width, no border radius)
// ============================================
.hi-alert-banner {
border-radius: 0;
border-left: none;
border-right: none;
}
// ============================================
// Center-aligned content
// ============================================
.hi-alert-center {
text-align: center;
justify-content: center;
.hi-alert-title,
.hi-alert-description {
margin-left: auto;
margin-right: auto;
}
}
// ============================================
// Without Title
// ============================================
.hi-alert-no-title {
.hi-alert-description {
margin: 0;
}
}
// ============================================
// With Action Button
// ============================================
.hi-alert-action {
.hi-alert-actions {
display: flex;
gap: 0.5rem;
margin-top: 0.75rem;
}
}
// ============================================
// Closable State
// ============================================
.hi-alert-closable {
cursor: pointer;
}