/**
 * Premium Components CSS
 * Complete component styles for all template elements
 * Includes animations, transitions, and hover states
 * 
 * @package SENNA_Launcher
 * @since 4.0.0
 */

/* ===========================
   PREMIUM VARIABLES
   =========================== */
:root {
    /* Primary Palette */
    --premium-cream: #FBF7F0;
    --premium-ivory: #FFFEF9;
    --premium-espresso: #0D353E;
    --premium-charcoal: #3A3633;
    
    /* Accent Colors */
    --premium-cognac: #0D353E;
    --premium-cognac-hover: #0A2A32;
    --premium-cognac-active: #082126;
    --premium-sage: #7A8471;
    --premium-sage-hover: #6B7563;
    --premium-gold: #C9B18F;
    --premium-pearl: #E8E2D5;
    
    /* Functional Colors */
    --premium-white: #FFFFFF;
    --premium-success: #7A8471;
    --premium-error: #A65A4C;
    --premium-warning: #C9B18F;
    
    /* Shadows */
    --premium-shadow-xs: 0 1px 2px rgba(26, 22, 18, 0.04);
    --premium-shadow-sm: 0 2px 4px rgba(26, 22, 18, 0.06);
    --premium-shadow-md: 0 4px 8px rgba(26, 22, 18, 0.08);
    --premium-shadow-lg: 0 8px 16px rgba(26, 22, 18, 0.10);
    --premium-shadow-xl: 0 16px 32px rgba(26, 22, 18, 0.12);
    
    /* Elevations */
    --premium-elevation-1: var(--premium-shadow-sm);
    --premium-elevation-2: var(--premium-shadow-md);
    --premium-elevation-3: var(--premium-shadow-lg);
    --premium-elevation-4: var(--premium-shadow-xl);
    
    /* Typography Scale */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Font Sizes */
    --text-display: clamp(48px, 8vw, 72px);
    --text-h1: clamp(36px, 6vw, 48px);
    --text-h2: clamp(28px, 4vw, 36px);
    --text-h3: clamp(24px, 3vw, 28px);
    --text-body-lg: 18px;
    --text-body: 16px;
    --text-caption: 14px;
    --text-micro: 12px;
    
    /* Line Heights */
    --leading-tight: 1.1;
    --leading-snug: 1.3;
    --leading-normal: 1.5;
    --leading-relaxed: 1.7;
    --leading-loose: 1.9;
    
    /* Letter Spacing */
    --tracking-tight: -0.02em;
    --tracking-normal: 0;
    --tracking-wide: 0.02em;
    --tracking-wider: 0.08em;
    --tracking-widest: 0.12em;
    
    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --space-4xl: 96px;
    
    /* Border Radius */
    --radius-none: 0;
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --radius-2xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    --transition-slower: 500ms ease;
}

/* ===========================
   IMPORT FONTS
   =========================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ===========================
   GLOBAL PREMIUM STYLING
   =========================== */
body {
    font-family: var(--font-body);
    color: var(--premium-charcoal);
    background-color: var(--premium-cream);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: var(--leading-normal);
}

/* ===========================
   PREMIUM ANIMATIONS
   =========================== */
@keyframes premiumFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes premiumSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes premiumSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes premiumPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes premiumShimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes premiumGlow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(13, 53, 62, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(13, 53, 62, 0.4);
    }
}

@keyframes premiumRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes premiumTyping {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes premiumBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* ===========================
   VISUAL CARDS ENHANCED
   =========================== */
.visual-cards-container {
    display: grid !important;
    gap: var(--space-lg) !important;
    margin: var(--space-3xl) auto !important;
    animation: premiumFadeIn var(--transition-slow) ease-out;
}

.visual-card {
    position: relative;
    padding: var(--space-2xl) var(--space-xl) !important;
    background: linear-gradient(135deg, var(--premium-white) 0%, var(--premium-ivory) 100%) !important;
    border: 1px solid rgba(13, 53, 62, 0.08) !important;
    border-radius: var(--radius-xl) !important;
    cursor: pointer;
    transition: all var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden;
    transform-style: preserve-3d;
    min-height: 200px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

/* Premium gradient overlay on hover */
.visual-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top left, rgba(13, 53, 62, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
}

/* Accent line animation */
.visual-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--premium-cognac), var(--premium-sage), var(--premium-gold));
    transform: translateX(-100%);
    transition: transform var(--transition-slow) cubic-bezier(0.4, 0, 0.2, 1);
}

.visual-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 
        0 12px 24px rgba(13, 53, 62, 0.12),
        0 24px 48px rgba(13, 53, 62, 0.08) !important;
    border-color: var(--premium-cognac) !important;
}

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

.visual-card:hover::after {
    transform: translateX(0);
}

.visual-card:active {
    transform: translateY(-4px) scale(1.01) !important;
    transition-duration: var(--transition-fast) !important;
}

/* Selected state with premium styling */
.visual-card.selected {
    background: linear-gradient(135deg, var(--premium-cognac) 0%, var(--premium-cognac-hover) 100%) !important;
    border-color: var(--premium-cognac) !important;
    transform: translateY(-6px) scale(1.01) !important;
    box-shadow: 
        0 16px 32px rgba(13, 53, 62, 0.2),
        0 8px 16px rgba(13, 53, 62, 0.15) !important;
}

.visual-card.selected::after {
    transform: translateX(0);
    background: linear-gradient(90deg, var(--premium-white), var(--premium-ivory));
}

.visual-card.selected .visual-card-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1) rotate(5deg) !important;
}

.visual-card.selected .visual-card-icon svg {
    stroke: var(--premium-white) !important;
    fill: none !important;
}

.visual-card.selected .visual-card-title,
.visual-card.selected .visual-card-description {
    color: var(--premium-white) !important;
}

/* Visual card icon styling */
.visual-card-icon {
    width: 56px !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: linear-gradient(135deg, rgba(13, 53, 62, 0.06), rgba(13, 53, 62, 0.02)) !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: var(--space-lg) !important;
    transition: all var(--transition-base) cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.visual-card-icon svg {
    width: 28px !important;
    height: 28px !important;
    stroke: var(--premium-cognac) !important;
    stroke-width: 2 !important;
    fill: none !important;
    transition: all var(--transition-base) !important;
}

.visual-card:hover .visual-card-icon {
    transform: scale(1.15) rotate(8deg) !important;
    background: linear-gradient(135deg, rgba(13, 53, 62, 0.1), rgba(13, 53, 62, 0.05)) !important;
}

.visual-card-title {
    font-family: var(--font-display) !important;
    font-size: var(--text-body-lg) !important;
    font-weight: 500 !important;
    color: var(--premium-espresso) !important;
    margin-bottom: var(--space-sm) !important;
    transition: color var(--transition-base) !important;
}

.visual-card-description {
    font-family: var(--font-body) !important;
    font-size: var(--text-caption) !important;
    color: var(--premium-charcoal) !important;
    opacity: 0.8 !important;
    transition: all var(--transition-base) !important;
}

.visual-card:hover .visual-card-title {
    color: var(--premium-cognac) !important;
}

.visual-card:hover .visual-card-description {
    opacity: 1 !important;
}

/* ===========================
   PREMIUM BUTTONS
   =========================== */
button {
    font-family: var(--font-body) !important;
    transition: all var(--transition-base) !important;
    cursor: pointer;
}

.premium-btn {
    padding: var(--space-md) var(--space-xl) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    font-size: var(--text-body) !important;
    font-weight: 500 !important;
    letter-spacing: var(--tracking-wide) !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all var(--transition-base) !important;
}

.premium-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width var(--transition-slow), height var(--transition-slow);
}

.premium-btn:hover::before {
    width: 300px;
    height: 300px;
}

.premium-btn-primary {
    background: var(--premium-cognac) !important;
    color: var(--premium-white) !important;
}

.premium-btn-primary:hover {
    background: var(--premium-cognac-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--premium-elevation-2) !important;
}

.premium-btn-primary:active {
    background: var(--premium-cognac-active) !important;
    transform: translateY(0) !important;
}

/* ===========================
   FORM ELEMENTS PREMIUM
   =========================== */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    font-family: var(--font-body) !important;
    font-size: var(--text-body) !important;
    padding: var(--space-md) !important;
    background: var(--premium-ivory) !important;
    border: 1px solid var(--premium-pearl) !important;
    border-radius: var(--radius-md) !important;
    color: var(--premium-espresso) !important;
    transition: all var(--transition-base) !important;
    width: 100% !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: var(--premium-cognac) !important;
    background: var(--premium-white) !important;
    box-shadow: 0 0 0 3px rgba(13, 53, 62, 0.1) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--premium-charcoal) !important;
    opacity: 0.5 !important;
}

/* ===========================
   STEP TRANSITIONS
   =========================== */
.onboarding-step {
    opacity: 0;
    display: none;
    transform: translateY(30px);
}

.onboarding-step.active {
    display: block !important;
    animation: stepFadeIn 0.6s ease forwards;
}

@keyframes stepFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.onboarding-step.transitioning-out {
    animation: stepFadeOut 0.4s ease forwards;
}

@keyframes stepFadeOut {
    to {
        opacity: 0;
        transform: translateX(-50px);
    }
}

.onboarding-step.transitioning-in {
    animation: stepSlideIn 0.5s ease forwards;
}

@keyframes stepSlideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===========================
   LOADING STATES
   =========================== */
.loading-placeholder {
    padding: var(--space-3xl) !important;
    text-align: center !important;
    color: var(--premium-charcoal) !important;
    font-family: var(--font-body) !important;
    font-size: var(--text-body) !important;
    position: relative !important;
    overflow: hidden !important;
}

.loading-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(13, 53, 62, 0.05) 50%,
        transparent 100%
    );
    animation: premiumShimmer 2s infinite;
}

.loading-dots {
    display: inline-block;
}

.loading-dots::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
}

/* ===========================
   FOCUS STATES
   =========================== */
*:focus-visible {
    outline: 2px solid var(--premium-cognac) !important;
    outline-offset: 2px !important;
}

button:focus-visible {
    outline-offset: 4px !important;
}

/* ===========================
   SCROLLBAR STYLING
   =========================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--premium-ivory);
}

::-webkit-scrollbar-thumb {
    background: var(--premium-pearl);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--premium-sage);
}

/* ===========================
   SELECTION STYLING
   =========================== */
::selection {
    background: var(--premium-cognac);
    color: var(--premium-white);
}

::-moz-selection {
    background: var(--premium-cognac);
    color: var(--premium-white);
}

/* ===========================
   RESPONSIVE UTILITIES
   =========================== */
@media (max-width: 768px) {
    :root {
        --text-display: 36px;
        --text-h1: 32px;
        --text-h2: 28px;
        --text-h3: 24px;
    }
    
    .visual-cards-container {
        gap: var(--space-md) !important;
    }
    
    .visual-card {
        padding: var(--space-xl) var(--space-lg) !important;
        min-height: 180px;
    }
    
    .visual-card-icon {
        width: 48px !important;
        height: 48px !important;
    }
    
    .visual-card-icon svg {
        width: 24px !important;
        height: 24px !important;
    }
}

@media (max-width: 480px) {
    :root {
        --text-display: 32px;
        --text-h1: 28px;
        --text-h2: 24px;
        --text-h3: 20px;
    }
    
    .visual-card {
        padding: var(--space-lg) var(--space-md) !important;
        min-height: 160px;
    }
    
    .visual-card:hover {
        transform: translateY(-4px) scale(1.01) !important;
    }
}

/* ===========================
   ACCESSIBILITY
   =========================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .visual-card {
        border-width: 2px !important;
    }
    
    button {
        border: 2px solid currentColor !important;
    }
}

/* ===========================
   PRINT STYLES
   =========================== */
@media print {
    .header-container,
    .journey-progress,
    .user-welcome,
    button,
    .action-btn {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .visual-card {
        border: 1px solid #000 !important;
        page-break-inside: avoid;
    }
}