/* ============================================
   BLORPS App - Component Styles
   Buttons, Stats Grid, Section Blocks
   ============================================ */

/* ============================================
   Action Buttons - Premium Gaming Style
   ============================================ */
.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.action-btn:hover svg {
    transform: scale(1.1) rotate(-5deg);
}

/* Primary Button - Start Mining (Green) */
.action-btn.primary {
    background: linear-gradient(165deg,
        rgba(74, 222, 128, 0.95) 0%,
        rgba(34, 197, 94, 0.95) 50%,
        rgba(22, 163, 74, 0.95) 100%);
    color: #0a1a10;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 4px 16px rgba(74, 222, 128, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -2px 8px rgba(0, 0, 0, 0.1);
}

/* Top shine effect */
.action-btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.3) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    pointer-events: none;
    border-radius: 11px 11px 50% 50%;
}

/* Glow effect on hover */
.action-btn.primary::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--green-light), var(--green-main));
    border-radius: 14px;
    opacity: 0;
    z-index: -1;
    filter: blur(12px);
    transition: opacity 0.3s ease;
}

.action-btn.primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 28px rgba(74, 222, 128, 0.45),
        0 4px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 20px rgba(74, 222, 128, 0.3);
    border-color: rgba(255, 255, 255, 0.35);
}

.action-btn.primary:hover::after {
    opacity: 0.5;
}

.action-btn.primary:active {
    transform: translateY(-1px) scale(1);
    box-shadow:
        0 4px 12px rgba(74, 222, 128, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Secondary Button - Go Raiding (Outlined/Glass) */
.action-btn.secondary {
    background: linear-gradient(165deg,
        rgba(25, 30, 45, 0.9) 0%,
        rgba(15, 18, 30, 0.95) 100%);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* Subtle top accent for secondary */
.action-btn.secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(244, 114, 182, 0.5) 50%,
        transparent 100%);
    opacity: 0.7;
}

/* Glow effect for secondary */
.action-btn.secondary::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--pink-light), var(--pink-main));
    border-radius: 14px;
    opacity: 0;
    z-index: -1;
    filter: blur(12px);
    transition: opacity 0.3s ease;
}

.action-btn.secondary:hover {
    background: linear-gradient(165deg,
        rgba(35, 40, 55, 0.95) 0%,
        rgba(25, 28, 40, 0.98) 100%);
    border-color: rgba(244, 114, 182, 0.3);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.35),
        0 0 20px rgba(244, 114, 182, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.action-btn.secondary:hover::before {
    opacity: 1;
}

.action-btn.secondary:hover::after {
    opacity: 0.3;
}

.action-btn.secondary:active {
    transform: translateY(-1px) scale(1);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Stats Grid
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

/* Premium Stat Card Design - Gaming Dashboard Style */
.stat-card {
    background: linear-gradient(165deg,
        rgba(25, 30, 45, 0.95) 0%,
        rgba(15, 18, 30, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

/* Accent line at top */
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--green-main), transparent 80%); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--blue-light), transparent 80%); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--pink-light), transparent 80%); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, var(--yellow-main), transparent 80%); }

/* Subtle corner glow */
.stat-card::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    top: -40px;
    right: -40px;
    opacity: 0.08;
    filter: blur(20px);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.stat-card:nth-child(1)::after { background: var(--green-main); }
.stat-card:nth-child(2)::after { background: var(--blue-light); }
.stat-card:nth-child(3)::after { background: var(--pink-light); }
.stat-card:nth-child(4)::after { background: var(--yellow-main); }

/* Card inner - two row layout */
.stat-card-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

/* Top row: icon + number + badge */
.stat-card-inner > :first-child {
    display: contents;
}

/* Icon area - compact */
.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.08);
}

.stat-icon svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Color variants - more saturated */
.stat-icon.green {
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(34, 197, 94, 0.35));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-icon.blue {
    background: linear-gradient(135deg, rgba(107, 207, 255, 0.2), rgba(34, 211, 238, 0.35));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-icon.pink {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.2), rgba(236, 72, 153, 0.35));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-icon.yellow {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.15), rgba(234, 179, 8, 0.3));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Main content row */
.stat-card-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto;
    gap: 4px 14px;
    align-items: center;
}

.stat-icon {
    grid-row: 1 / 3;
    align-self: center;
}

.stat-content {
    display: contents;
}

.stat-value {
    grid-column: 2;
    grid-row: 1;
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    letter-spacing: -0.5px;
}

.stat-label {
    grid-column: 2;
    grid-row: 2;
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Badge - positioned right, compact and contained */
.stat-change {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.2;
    backdrop-filter: blur(8px);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-width: 115px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-change.positive {
    color: var(--green-main);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15) 0%, rgba(74, 222, 128, 0.05) 100%);
    border-color: rgba(74, 222, 128, 0.25);
    box-shadow:
        0 2px 8px rgba(74, 222, 128, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Card-specific badge colors on hover */
.stat-card:nth-child(1):hover .stat-change {
    border-color: rgba(74, 222, 128, 0.3);
    box-shadow: 0 2px 12px rgba(74, 222, 128, 0.15);
}
.stat-card:nth-child(2):hover .stat-change {
    border-color: rgba(107, 207, 255, 0.3);
    box-shadow: 0 2px 12px rgba(107, 207, 255, 0.15);
}
.stat-card:nth-child(3):hover .stat-change {
    border-color: rgba(244, 114, 182, 0.3);
    box-shadow: 0 2px 12px rgba(244, 114, 182, 0.15);
}
.stat-card:nth-child(4):hover .stat-change {
    border-color: rgba(250, 204, 21, 0.3);
    box-shadow: 0 2px 12px rgba(250, 204, 21, 0.15);
}

/* Hover states */
.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.03);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover::after {
    opacity: 0.15;
}

/* Rarity-specific hover glows */
.stat-card:nth-child(1):hover {
    border-color: rgba(74, 222, 128, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(74, 222, 128, 0.08);
}
.stat-card:nth-child(2):hover {
    border-color: rgba(107, 207, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(107, 207, 255, 0.08);
}
.stat-card:nth-child(3):hover {
    border-color: rgba(244, 114, 182, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(244, 114, 182, 0.08);
}
.stat-card:nth-child(4):hover {
    border-color: rgba(250, 204, 21, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(250, 204, 21, 0.08);
}

/* ============================================
   Section Block
   ============================================ */
.section-block {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 22px;
    position: relative;
    display: inline-block;
}

.see-all {
    color: var(--green-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.see-all:hover {
    opacity: 0.8;
}

/* ============================================
   Filter Bar
   ============================================ */
.filter-bar {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.filter-select:hover,
.filter-select:focus {
    border-color: var(--border-active);
}

.filter-select option {
    background: var(--bg-dark);
}

/* ============================================
   Notification Panel
   ============================================ */
.notification-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 360px;
    max-height: 480px;
    background: rgba(16, 36, 48, 0.98);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(74, 222, 128, 0.1);
    backdrop-filter: blur(20px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    overflow: hidden;
}

.notification-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notification-panel-header h3 {
    font-family: var(--font-display);
    font-size: 18px;
    color: white;
    margin: 0;
}

.mark-all-read-btn {
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--green-main);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mark-all-read-btn:hover {
    background: rgba(74, 222, 128, 0.1);
}

.mark-all-read-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Notification List */
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-list::-webkit-scrollbar {
    width: 6px;
}

.notification-list::-webkit-scrollbar-track {
    background: transparent;
}

.notification-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* Empty State */
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    color: rgba(255, 255, 255, 0.4);
    gap: 12px;
}

.notification-empty svg {
    opacity: 0.3;
}

.notification-empty p {
    font-family: var(--font-body);
    font-size: 14px;
    margin: 0;
}

/* Individual Notification Item */
.notification-item {
    display: flex;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notification-item.unread {
    background: rgba(74, 222, 128, 0.05);
}

.notification-item.unread:hover {
    background: rgba(74, 222, 128, 0.08);
}

.notification-item.has-action {
    padding-bottom: 14px;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-icon.raid {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.notification-icon.victory {
    background: rgba(74, 222, 128, 0.15);
    color: var(--green-main);
}

.notification-icon.defeat {
    background: rgba(255, 107, 107, 0.15);
    color: #ff6b6b;
}

.notification-icon.expedition {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin: 0 0 4px 0;
}

.notification-message {
    font-family: var(--font-body);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.notification-time {
    font-family: var(--font-body);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
}

.notification-item.unread .notification-title {
    color: var(--green-main);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 24px;
    width: 6px;
    height: 6px;
    background: var(--green-main);
    border-radius: 50%;
}

/* Header row with title and time */
.notification-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.notification-header-row .notification-time {
    flex-shrink: 0;
    margin-top: 2px;
}

.notification-header-row .notification-title {
    margin: 0;
}

/* Action area - unified timer + button */
.notification-action-area {
    margin-top: 12px;
}

.notification-action-area.expired {
    margin-top: 10px;
}

.notification-expired-label {
    font-family: var(--font-body);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    font-style: italic;
}

/* Unified reinforce button with integrated timer */
.notification-reinforce-btn {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background: linear-gradient(165deg,
        rgba(74, 222, 128, 0.15) 0%,
        rgba(34, 197, 94, 0.08) 100%);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 8px;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.notification-reinforce-btn:hover {
    background: linear-gradient(165deg,
        rgba(74, 222, 128, 0.25) 0%,
        rgba(34, 197, 94, 0.15) 100%);
    border-color: rgba(74, 222, 128, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(74, 222, 128, 0.2);
}

/* Timer section */
.reinforce-timer {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(251, 191, 36, 0.12);
    font-size: 12px;
    font-weight: 700;
    color: #fbbf24;
    font-variant-numeric: tabular-nums;
}

.timer-dot {
    width: 6px;
    height: 6px;
    background: #fbbf24;
    border-radius: 50%;
    animation: timer-pulse 1.2s ease-in-out infinite;
}

@keyframes timer-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

/* Divider between timer and action */
.reinforce-divider {
    width: 1px;
    height: 20px;
    background: rgba(74, 222, 128, 0.25);
}

/* Action label section */
.reinforce-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--green-light);
}

.reinforce-label svg {
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.notification-reinforce-btn:hover .reinforce-label svg {
    transform: scale(1.1);
}

.notification-reinforce-btn:hover .timer-dot {
    animation-duration: 0.6s;
}

/* Per-type variants. raid_started is the urgent "defend now" path —
   should look distinct from the optional counter-moves so users don't
   conflate "your mine is under attack" with "your opponent reinforced". */
.notification-reinforce-btn.variant-defend {
    background: linear-gradient(165deg, rgba(248, 113, 113, 0.30) 0%, rgba(220, 38, 38, 0.18) 100%);
    border-color: rgba(248, 113, 113, 0.55);
}
.notification-reinforce-btn.variant-defend:hover {
    background: linear-gradient(165deg, rgba(248, 113, 113, 0.40) 0%, rgba(220, 38, 38, 0.25) 100%);
    border-color: rgba(248, 113, 113, 0.75);
}
.notification-reinforce-btn.variant-defend .timer-dot {
    background: #f87171;
}

.notification-reinforce-btn.variant-counter-defend,
.notification-reinforce-btn.variant-counter-attack {
    background: linear-gradient(165deg, rgba(255, 179, 122, 0.22) 0%, rgba(234, 88, 12, 0.13) 100%);
    border-color: rgba(255, 179, 122, 0.45);
}
.notification-reinforce-btn.variant-counter-defend:hover,
.notification-reinforce-btn.variant-counter-attack:hover {
    background: linear-gradient(165deg, rgba(255, 179, 122, 0.32) 0%, rgba(234, 88, 12, 0.20) 100%);
    border-color: rgba(255, 179, 122, 0.65);
}
.notification-reinforce-btn.variant-counter-defend .timer-dot,
.notification-reinforce-btn.variant-counter-attack .timer-dot {
    background: #ffb37a;
}

/* ============================================
   Notification Bell (Header)
   ============================================ */
.notification-container {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.5);
}

.notification-bell svg {
    width: 16px;
    height: 16px;
    transition: transform 0.25s ease;
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.notification-bell:hover svg {
    transform: rotate(-8deg) scale(1.05);
}

.notification-bell.has-unread {
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.12);
}

.notification-bell.has-unread:hover {
    border-color: rgba(74, 222, 128, 0.3);
    color: var(--green-main);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 8px;
    height: 8px;
    padding: 0;
    background: #ef4444;
    border-radius: 50%;
    font-family: var(--font-body);
    font-size: 0;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 0 0 2px var(--bg-dark);
}

.notification-badge.visible {
    opacity: 1;
    transform: scale(1);
}

/* Show count only when > 1 */
.notification-badge.visible[data-count]:not([data-count="1"]) {
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    font-size: 9px;
    border-radius: 7px;
    top: 2px;
    right: 2px;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
    grid-column: 1 / -1;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px dashed var(--border-subtle);
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

.empty-state .action-btn {
    margin-top: 10px;
}

/* ============================================
   Wallet Connection States - Premium Gaming Style
   ============================================ */
.connect-wallet svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Status indicator - pulsing dot */
.connect-wallet .wallet-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    position: relative;
}

.connect-wallet .wallet-status.connected {
    background: var(--green-main);
    box-shadow: 0 0 8px var(--green-main);
    animation: pulse-status 2s ease-in-out infinite;
}

.connect-wallet .wallet-status.wrong-network {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    animation: pulse-error 1s ease-in-out infinite;
}

@keyframes pulse-status {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 8px var(--green-main);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 12px var(--green-main);
    }
}

@keyframes pulse-error {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 8px #ef4444;
    }
    50% {
        opacity: 0.8;
        transform: scale(1.15);
        box-shadow: 0 0 12px #ef4444;
    }
}

/* Connected state */
.connect-wallet.connected {
    border-color: rgba(74, 222, 128, 0.2);
}

.connect-wallet.connected::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(74, 222, 128, 0.6) 50%,
        transparent 100%);
}

.connect-wallet.connected:hover {
    border-color: rgba(74, 222, 128, 0.35);
}

/* Wrong network state */
.connect-wallet.wrong-network {
    background: linear-gradient(165deg,
        rgba(239, 68, 68, 0.15) 0%,
        rgba(220, 38, 38, 0.08) 100%);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.connect-wallet.wrong-network::before {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(239, 68, 68, 0.6) 50%,
        transparent 100%);
}

.connect-wallet.wrong-network::after {
    background: #ef4444;
}

.connect-wallet.wrong-network:hover {
    background: linear-gradient(165deg,
        rgba(239, 68, 68, 0.2) 0%,
        rgba(220, 38, 38, 0.12) 100%);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow:
        0 8px 20px rgba(239, 68, 68, 0.15),
        0 0 16px rgba(239, 68, 68, 0.1);
}

/* Chevron dropdown indicator */
.connect-wallet .wallet-chevron {
    margin-left: 4px;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
}

.connect-wallet:hover .wallet-chevron {
    transform: translateY(2px);
    opacity: 1;
}

/* Loading state */
.connect-wallet .loading {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--green-main);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

/* Avalanche Theme Accent */
.connect-wallet.correct-network .wallet-status.connected {
    background: #e84142;
    box-shadow: 0 0 8px #e84142;
}

/* ============================================
   Network Warning Banner
   ============================================ */
.network-warning {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 32px;
    background: linear-gradient(
        135deg,
        rgba(232, 65, 66, 0.2) 0%,
        rgba(239, 68, 68, 0.08) 50%,
        rgba(232, 65, 66, 0.15) 100%
    );
    border-bottom: 1px solid rgba(239, 68, 68, 0.25);
    backdrop-filter: blur(12px);
    z-index: 100;
    animation: warningSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.network-warning ~ .main-content,
.network-warning + .main-content {
    padding-top: 60px;
}

@keyframes warningSlide {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.network-warning-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    max-width: 800px;
}

.network-warning-content > svg {
    color: #e84142;
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px rgba(232, 65, 66, 0.5));
}

.network-warning-content span {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.4;
}

.network-warning-content strong {
    color: #fca5a5;
    font-weight: 700;
}

.switch-network-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #e84142 0%, #dc2626 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow:
        0 2px 8px rgba(232, 65, 66, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

.switch-network-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(232, 65, 66, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.switch-network-btn:active {
    transform: translateY(0);
}

.switch-network-btn svg {
    color: white;
}

.network-warning-close {
    position: absolute;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.network-warning-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    transform: scale(1.05);
}

/* ============================================
   Header Action Button Enhancements
   ============================================ */
.header-action-btn:hover svg {
    transform: translateY(-1px);
}

.header-action-btn.deposit::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(74, 222, 128, 0.6) 50%,
        transparent 100%);
}

.header-action-btn.withdraw::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%);
}

/* ============================================
   Leaderboard Enhancements
   ============================================ */
.lb-item {
    transition: all 0.3s var(--ease-out-expo);
}

.lb-item:hover {
    background: var(--bg-card-hover);
    transform: translateX(4px);
}

.lb-rank.gold { color: #ffd93d; text-shadow: 0 0 10px rgba(255, 217, 61, 0.5); }
.lb-rank.silver { color: #c0c0c0; text-shadow: 0 0 10px rgba(192, 192, 192, 0.5); }
.lb-rank.bronze { color: #cd7f32; text-shadow: 0 0 10px rgba(205, 127, 50, 0.5); }

/* ============================================
   Action Button States
   Loading state is unified into the shared .btn--loading spinner
   (see "Shared Button Base + Modifiers" below); .action-btn.loading and
   .btn.is-loading are grouped into that single definition.
   ============================================ */
.success-flash {
    animation: successFlash 0.6s ease;
}

@keyframes successFlash {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
    50% { box-shadow: 0 0 30px 10px rgba(74, 222, 128, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* Hover glow for interactive elements */
.blorp-option:hover,
.breeding-parent-slot:hover,
.team-member:hover {
    box-shadow: 0 0 25px rgba(74, 222, 128, 0.2);
}

/* Nav badge updated state */
.nav-badge.updated {
    animation: badgePulse 0.5s ease;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Merc price styling */
.merc-price .price-amount {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--yellow-main);
}


/* ============================================
   Skeleton placeholders (used with .skeleton from base.css)
   ============================================ */

.skeleton-grid-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.skeleton-grid-card .skeleton-art {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
}

.skeleton-grid-card .skeleton-line,
.skeleton-row .skeleton-line {
    height: 12px;
    width: 75%;
}

.skeleton-grid-card .skeleton-line.short,
.skeleton-row .skeleton-line.short {
    width: 45%;
}

.skeleton-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    pointer-events: none;
}

.skeleton-row .skeleton-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-row .skeleton-line {
    flex: 1;
    max-width: 220px;
}

.skeleton-row .skeleton-line.short {
    max-width: 90px;
    margin-left: auto;
}

/* ============================================
   Guided empty state (mining/raiding team lists)
   ============================================ */

.empty-guide {
    text-align: center;
    padding: 28px 20px;
    border: 1px dashed var(--border-subtle);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.empty-guide h4 {
    color: #fff;
    font-size: 16px;
    margin: 0 0 8px;
}

.empty-guide p {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    max-width: 320px;
    margin-inline: auto;
}

.empty-guide-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.empty-guide-btn {
    padding: 9px 18px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--green-main);
    border: 1px solid var(--green-main);
    color: var(--bg-dark, #051828);
}

.empty-guide-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 14px rgba(45, 212, 233, 0.3);
}

.empty-guide-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-subtle);
    color: var(--text-dim);
}

.empty-guide-btn.secondary:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

/* ============================================
   Shared Button Base + Modifiers (.btn / .btn--*)
   Opt-in button system for new UI. Base values intentionally mirror the
   existing marketplace `.btn` (which loads later) so load order never
   changes the look. Existing button classes (.action-btn, .buy-btn,
   .attack-btn, .btn-primary, etc.) are left untouched — this only ADDS
   BEM-style modifiers agents can opt into.
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: transform 0.2s var(--ease-smooth),
                box-shadow 0.2s ease,
                background 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease,
                opacity 0.2s ease;
}

.btn:disabled,
.btn[aria-disabled="true"],
.btn.is-disabled,
.action-btn:disabled,
.action-btn[aria-disabled="true"],
.action-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.btn:focus-visible,
.action-btn:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

/* Primary — river aqua, matches .action-btn.primary intent.
   `.btn-primary` is the legacy dash spelling (marketplace/premint markup);
   grouped here so both spellings render identically from this one source. */
.btn--primary,
.btn-primary {
    background: linear-gradient(135deg, var(--green-main), var(--green-dark));
    color: #051828;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(45, 212, 233, 0.3);
}

.btn--primary:hover:not(:disabled):not(.is-disabled),
.btn-primary:hover:not(:disabled):not(.is-disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(45, 212, 233, 0.45);
}

.btn--primary:active:not(:disabled):not(.is-disabled),
.btn-primary:active:not(:disabled):not(.is-disabled) {
    transform: translateY(0);
}

/* Secondary — coral accent, glassy fill */
.btn--secondary {
    background: rgba(255, 138, 108, 0.14);
    color: var(--pink-glow);
    border-color: rgba(255, 138, 108, 0.4);
}

.btn--secondary:hover:not(:disabled):not(.is-disabled) {
    background: rgba(255, 138, 108, 0.22);
    border-color: rgba(255, 138, 108, 0.6);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255, 138, 108, 0.2);
}

/* Danger — destructive actions */
.btn--danger {
    background: linear-gradient(135deg, var(--color-danger), #b91c1c);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
}

.btn--danger:hover:not(:disabled):not(.is-disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
}

/* Ghost — quiet / tertiary. `.btn-ghost` is the legacy dash spelling. */
.btn--ghost,
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-color: var(--border-subtle);
}

.btn--ghost:hover:not(:disabled):not(.is-disabled),
.btn-ghost:hover:not(:disabled):not(.is-disabled) {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-main);
}

/* Small size. `.btn-sm` is the legacy dash spelling. */
.btn--sm,
.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    gap: 6px;
    border-radius: 8px;
}

/* Full-width modifier (aliases the legacy dash `.btn-block`). Orthogonal
   to the variant/size modifiers above; combine with any of them. */
.btn-block {
    display: flex;
    width: 100%;
}

/* Loading — dims, blocks input, shows an inline spinner. Hide any inner
   glyph/label shift by nudging content; the spinner sits before content. */
.btn--loading,
.btn.is-loading,
.action-btn.loading {
    pointer-events: none;
    opacity: 0.75;
    cursor: progress;
}

.btn--loading::before,
.btn.is-loading::before,
.action-btn.loading::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-right-color: currentColor;
    border-radius: 50%;
    animation: btnSpin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ============================================
   Shared Modal Shell (.modal-shell)
   Style base other agents can mount new modals into. Matches the frosted,
   aqua-bordered look of the existing modals (see modals.css) without
   depending on it. Toggle open state with the `.open` class.
   ============================================ */
.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 12, 22, 0.72);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-shell.open {
    opacity: 1;
    visibility: visible;
}

.modal-shell__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 48px);
    background: var(--surface-2);
    border: 1px solid var(--border-active);
    border-radius: 18px;
    box-shadow: var(--shadow-elevated), 0 0 30px rgba(45, 212, 233, 0.1);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.25s var(--ease-out-expo);
}

.modal-shell.open .modal-shell__panel {
    transform: translateY(0) scale(1);
}

.modal-shell__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.modal-shell__title {
    font-family: var(--font-display);
    font-size: 20px;
    color: var(--text-main);
    margin: 0;
}

.modal-shell__body {
    padding: 22px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.modal-shell__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.modal-shell__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-shell__close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-main);
    transform: scale(1.05);
}

.modal-shell__close:focus-visible {
    outline: 2px solid var(--green-main);
    outline-offset: 2px;
}

/* Mobile — near full-width sheet, bottom-anchored, comfortable tap targets */
@media (max-width: 600px) {
    .modal-shell {
        padding: 0;
        align-items: flex-end;
    }

    .modal-shell__panel {
        max-width: none;
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
        border-bottom: none;
    }

    .modal-shell__header,
    .modal-shell__footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .modal-shell__body {
        padding: 18px;
    }

    .modal-shell__close {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   FX / Celebration Overlay
   Minimal non-conflicting utility a JS confetti/particle helper can mount
   into (canvas or absolutely-positioned particles). Never intercepts input.
   ============================================ */
.fx-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
}

.celebrate-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ============ Social handles (socialgraph resolution) ============ */
/* Wallet tags upgrade in place from 0x1234...abcd to a clickable @handle. */
.wallet-x-link {
    color: var(--blue-main, #5e8fff);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer; /* span-based link (nested-anchor-safe) */
}

.wallet-x-link:hover { text-decoration: underline; }




/* ============ Multichain: network switcher, stats toggle, bridge ============ */

/* Chain logos (network switcher, stats toggle, bridge page). */
.network-logo {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: -3px;
    margin-right: 4px;
}

/* Sidebar network switcher. */
.network-switcher {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    border-top: 1px solid var(--border-subtle);
}

.network-switcher .network-option {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s ease;
}

.network-switcher .network-option:hover {
    border-color: var(--green-main);
    color: var(--text-primary);
}

.network-switcher .network-option.active {
    background: rgba(74, 222, 128, 0.12);
    border-color: var(--green-main);
    color: var(--green-main);
    cursor: default;
}

/* Stats chain toggle pills. */
.stats-chain-toggle {
    display: flex;
    gap: 8px;
}

.stats-chain-toggle .stats-chain-option {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s ease;
}

.stats-chain-toggle .stats-chain-option:hover {
    border-color: var(--green-main);
    color: var(--text-primary);
}

.stats-chain-toggle .stats-chain-option.active {
    background: rgba(74, 222, 128, 0.12);
    border-color: var(--green-main);
    color: var(--green-main);
}

/* ============ Bridge tab page ============ */

.bridge-layout {
    max-width: 960px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ROE + Salmon panels side by side on desktop, stacked on narrow screens. */
.bridge-send-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 760px) {
    .bridge-send-grid { grid-template-columns: 1fr; }
}

/* Direction banner: From <chain> -> To <chain>. */
.bridge-direction-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 22px;
    background: var(--bg-card, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}

.bridge-dir-chain {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
}

.bridge-dir-chain img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.bridge-dir-arrow {
    color: var(--green-main);
    font-size: 22px;
    line-height: 1;
}

.bridge-note {
    margin-left: auto;
    max-width: 220px;
    font-size: 12px;
    color: var(--text-dim);
    text-align: right;
}

@media (max-width: 720px) {
    /* The delivery note wraps under the chain pair instead of overflowing
       off the right edge of the card. */
    .bridge-direction-card { flex-wrap: wrap; }
    .bridge-note {
        margin-left: 0;
        max-width: none;
        flex-basis: 100%;
        text-align: left;
    }
    /* Amount input takes the full row; Max + Bridge share the next line. */
    .bridge-field { flex-wrap: wrap; }
    .bridge-field input { flex-basis: 100%; }
}

/* Send panels (ROE, Salmon). */
.bridge-panel {
    display: flex;
    flex-direction: column;
    padding: 22px 24px;
    background: var(--bg-card, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}

.bridge-panel h3 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--text-primary);
}

.bridge-hint {
    margin: 0 0 14px;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--text-dim);
}

/* ROE input + button inline (the full-width panel has room). */
.bridge-field {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.bridge-field input {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 14px;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-main);
    color: var(--text-primary);
    transition: border-color 0.15s ease;
}

.bridge-field input:focus {
    outline: none;
    border-color: var(--green-main);
}

.bridge-max-btn {
    flex-shrink: 0;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: transparent;
    color: var(--green-main);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.bridge-max-btn:hover {
    border-color: var(--green-main);
    background: rgba(74, 222, 128, 0.08);
}

.bridge-field .btn-primary {
    flex-shrink: 0;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: var(--green-main);
    color: #05231a;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.bridge-field .btn-primary:hover { filter: brightness(1.08); }

.bridge-fee {
    margin-top: 12px;
    font-size: 12.5px;
    color: var(--text-dim);
    font-variant-numeric: tabular-nums;
}

/* Gas-drop presets. */
.bridge-gasdrop h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bridge-optional {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bridge-gasdrop-options {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.bridge-gasdrop-options .gasdrop-option {
    flex: 1;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    background: var(--bg-main);
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.15s ease;
}

.bridge-gasdrop-options .gasdrop-option:hover {
    border-color: var(--green-main);
    color: var(--text-primary);
}

.bridge-gasdrop-options .gasdrop-option.active {
    background: rgba(74, 222, 128, 0.12);
    border-color: var(--green-main);
    color: var(--green-main);
}

/* Salmon picker: reuse the Deposit-modal wallet grid, capped + scrollable. */
.bridge-salmon-grid {
    margin: 14px 0 4px;
    /* Show the first row fully plus a peek of the second, so it's clearly
       scrollable. Cards are ~430px tall. !important beats any inherited
       grid height from the shared .wallet-blorps-grid rules. */
    max-height: 340px !important;
    overflow-y: auto;
    padding: 2px;
}

.bridge-picker-empty {
    grid-column: 1 / -1;
    padding: 28px 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
}

/* The reused mini-card's base ::after carries an animated transform (a glow
   ring); it bleeds into the selection checkmark ::after on the page (outside
   the modal context that normally tames it), shrinking + rotating the tick.
   Pin the checkmark to a clean top-right badge. */
.bridge-salmon-grid .blorp-card-wrapper.mini.selected::after {
    transform: none !important;
    animation: none !important;
    top: 8px !important;
    right: 8px !important;
    left: auto !important;
    bottom: auto !important;
    width: 24px !important;
    height: 24px !important;
}

/* Salmon panel footer: fee on the left, bridge button on the right. */
.bridge-salmon-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.bridge-salmon-footer .bridge-fee { margin: 0; }

.bridge-salmon-footer .btn-primary {
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    background: var(--green-main);
    color: #05231a;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.bridge-salmon-footer .btn-primary:hover { filter: brightness(1.08); }

.bridge-salmon-footer .btn-primary:disabled {
    opacity: 0.5;
    cursor: default;
    filter: none;
}

/* Gas-drop preset: stacked label + amount. */
.bridge-gasdrop-options .gasdrop-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    line-height: 1.2;
}

.gasdrop-amount {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.75;
    font-variant-numeric: tabular-nums;
}

/* LayerZero credit. */
.bridge-powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.bridge-powered-by img {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: cover;
}

/* Week-one salmon lock: panel greys out under a countdown banner while the
   adapter's sendEnabledAfter is in the future (bridge.js drives the state). */
.bridge-salmon-lock {
    margin: 10px 0 14px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 180, 60, 0.35);
    border-radius: 10px;
    background: rgba(255, 180, 60, 0.08);
}

.bridge-lock-title {
    font-weight: 700;
    font-size: 15px;
    color: #ffb43c;
    margin-bottom: 6px;
}

.bridge-lock-title span {
    font-variant-numeric: tabular-nums;
}

.bridge-lock-sub {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-dim);
}

.bridge-panel.locked .bridge-hint,
.bridge-panel.locked .bridge-salmon-grid,
.bridge-panel.locked .bridge-salmon-footer {
    opacity: 0.35;
    filter: grayscale(0.8);
    pointer-events: none;
    user-select: none;
}
