/**
 * Action Hub Module Styles - Premium Two-Column Design
 * Modern glassmorphic design with progress tracking and animations
 */

/* Grid Container */
.action-grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 10px 0;
}

/* Premium Action Card */
.action-card-premium {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(139, 92, 246, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.action-card-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Icon Container */
.action-icon-premium {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(139, 92, 246, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Premium Button */
.action-button-premium {
    padding: 10px 20px;
    background: #8b5cf6;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.action-button-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.action-button-premium:active {
    transform: translateY(0);
}

/* Sprint 08 §3: Ghost/outline CTA for non-primary action cards */
.action-button-ghost {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: #a78bfa;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.action-button-ghost:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.5);
    color: #c4b5fd;
    transform: translateY(-1px);
}

.action-button-ghost:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .action-grid-container {
        gap: 14px;
    }

    .action-card-premium {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .action-grid-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .action-card-premium {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .action-icon-premium {
        width: 48px;
        height: 48px;
    }

    .action-button-premium {
        width: 100%;
        justify-content: center;
    }

    .action-button-ghost {
        width: 100%;
        justify-content: center;
    }
}

/* Animation for new cards — opacity only to avoid CLS */
@keyframes slideInCard {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.action-card-premium {
    animation: slideInCard 0.3s ease-out;
}

/* Progress Ring Animation */
@keyframes progressRingPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

/* Glow effect for active card */
.action-card-premium[style*="box-shadow: 0 0 20px"] {
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.1);
    }
}

/* ═══════════════════════════════════════════════════════════════
   Sprint 2B: CSS Extraction — .ah-* class vocabulary
   Extracted from inline style.cssText assignments in action-hub.js
   Spec: sprint-02b-css-extraction.md v1.2.5
   ═══════════════════════════════════════════════════════════════ */

/* ── Layout wrappers ── */
.ah-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.ah-tab-container {
    display: flex;
    justify-content: center;
}

/* ── Card content area ── */
.ah-card-content {
    flex: 1;
    min-width: 0;
}

/* ── Category tag + label ── */
.ah-category-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.ah-category-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Registry card wrapper ── */
.ah-registry-wrapper {
    width: 100%;
}

/* ── Card title ── */
.ah-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
    line-height: 1.4;
}

/* ── Card meta row ── */
.ah-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

/* ── Card time ── */
.ah-card-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
}

/* ── Card reschedule ── */
.ah-card-reschedule {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: pointer;
}

/* ── Button slot ── */
.ah-btn-slot {
    flex-shrink: 0;
    min-height: 32px;
    display: flex;
    align-items: center;
}

/* ── Completed badge ── */
.ah-completed-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ah-completed-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ah-completed-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #10b981;
    text-transform: uppercase;
}

.ah-completed-time {
    font-size: 0.65rem;
    color: #6ee7b7;
}

/* ── Review button variant ── */
.ah-btn-review {
    background: #fbbf24;
    color: #78350f;
}

/* ── AI insight badge ── */
.ah-insight-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.25);
}

.ah-insight-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #a78bfa;
    text-transform: uppercase;
}

/* ── Progress header ── */
.ah-progress-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* ── Streak chip (moved from JS <style> tag) ── */
.streak-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 14px;
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.3);
    color: #fb923c;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Quick bar ── */
.ah-quick-bar {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scroll-snap-type: x proximity;
    scroll-padding-left: 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ah-quick-bar::-webkit-scrollbar {
    display: none;
}

/* ── Quick bar pills ── */
.qb-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 22px;
    min-height: 44px;
    min-width: 72px;
    max-width: 180px;
    box-sizing: border-box;
    border: 1px solid rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.06);
    color: #c4b5fd;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    white-space: nowrap;
    flex: 0 0 auto;
}

.qb-pill .qb-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 120px;
}

.qb-pill:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.4);
    color: #e9d5ff;
    transform: translateY(-1px);
}

.qb-pill i {
    font-size: 0.8rem;
}

.qb-pill:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

@media (min-width: 481px) {
    .ah-quick-bar {
        flex-wrap: wrap;
    }
}

/* ── Empty state ── */
.ah-empty-state {
    text-align: center;
    padding: 40px 20px;
}

/* ── Fallback card ── */
.ah-fallback-label {
    text-align: center;
    color: var(--text-muted);
    padding: 0 16px 16px;
}

/* ── Fallback card ── */
.ah-fallback-card {
    opacity: 0.5;
}

/* ── Nutrition progress ── */
.ah-nutrition-progress {
    margin-top: 8px;
}

.ah-nutrition-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.ah-nutrition-current {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.ah-nutrition-percent {
    font-size: 0.7rem;
    font-weight: 600;
    color: #10b981;
}

.ah-nutrition-track {
    height: 6px;
    background: rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.ah-nutrition-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 10px;
    transition: width 0.3s ease;
}

/* ── Tab content animation ── */
.ah-tab-content-animated {
    animation: fadeIn 0.4s ease-out;
}

/* ── Card state variants ── */
.ah-card-completed-glow {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

/* ── Tab bar ── */
.ah-tab-icon {
    font-size: 1.1rem;
}

.ah-tab-label {
    font-size: 0.95rem;
    letter-spacing: 0.03em;
}

/* ══════════════════════════════════════════════════════
   Sprint 3: Card state classes
   ══════════════════════════════════════════════════════ */

/* Priority accent — color comes from el.style.borderColor */
.ah-card-high-priority {
    border-left-width: 4px;
    border-left-style: solid;
    border-left-color: inherit;
}

/* First-card glow (fixed neutral — no dynamic color) */
.ah-card-first {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* ══════════════════════════════════════════════════════
   Sprint 3: Wins tab
   ══════════════════════════════════════════════════════ */

.ah-wins-empty {
    text-align: center;
    padding: 40px 20px;
}

.ah-wins-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.ah-wins-empty-msg {
    color: var(--text-muted);
    font-size: 1rem;
}

.ah-wins-wrapper {
    padding: 10px 0;
}

.ah-wins-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.ah-wins-icon {
    background: #10b98115;
    color: #10b981;
}

.ah-wins-icon i {
    font-size: 1.25rem;
}

.ah-wins-content {
    flex-grow: 1;
    min-width: 0;
}

.ah-wins-meta-icon {
    font-size: 0.7rem;
}

.ah-wins-badge-slot {
    flex-shrink: 0;
}

.ah-wins-badge {
    background: #10b98125;
    color: #10b981;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ══════════════════════════════════════════════════════
   Sprint 3: Watchouts tab
   ══════════════════════════════════════════════════════ */

.ah-watchouts-empty {
    text-align: center;
    padding: 40px 20px;
}

.ah-watchouts-empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.ah-watchouts-empty-msg {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ══════════════════════════════════════════════════════
   Sprint 3: Tools tab
   ══════════════════════════════════════════════════════ */

.ah-tools-wrapper {
    text-align: center;
    padding: 40px 20px;
}

.ah-tools-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.ah-tools-label {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 30px;
}

.ah-tools-btn {
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ah-tools-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 15px;
}

/* ══════════════════════════════════════════════════════
   Sprint 3: Nutrition fill discrete steps (0–100 by 5%)
   ══════════════════════════════════════════════════════ */

.ah-fill-p0 {
    width: 0%;
}

.ah-fill-p5 {
    width: 5%;
}

.ah-fill-p10 {
    width: 10%;
}

.ah-fill-p15 {
    width: 15%;
}

.ah-fill-p20 {
    width: 20%;
}

.ah-fill-p25 {
    width: 25%;
}

.ah-fill-p30 {
    width: 30%;
}

.ah-fill-p35 {
    width: 35%;
}

.ah-fill-p40 {
    width: 40%;
}

.ah-fill-p45 {
    width: 45%;
}

.ah-fill-p50 {
    width: 50%;
}

.ah-fill-p55 {
    width: 55%;
}

.ah-fill-p60 {
    width: 60%;
}

.ah-fill-p65 {
    width: 65%;
}

.ah-fill-p70 {
    width: 70%;
}

.ah-fill-p75 {
    width: 75%;
}

.ah-fill-p80 {
    width: 80%;
}

.ah-fill-p85 {
    width: 85%;
}

.ah-fill-p90 {
    width: 90%;
}

.ah-fill-p95 {
    width: 95%;
}

.ah-fill-p100 {
    width: 100%;
}