/**
 * HERMETIKA COMPONENT LIBRARY
 * 
 * Reusable UI components with mystical aesthetics
 * Dependencies: tokens.css, glassmorphism.css
 */

/* ==========================================
   BUTTONS
   ========================================== */

/* Primary Action Button (Mystical Gold) */
.btn-mystical {
    position: relative;
    background: var(--gradient-gold);
    border: none;
    color: var(--bg-primary);
    padding: 14px 32px;
    border-radius: var(--radius-lg);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--font-size-base);
    letter-spacing: 0.02em;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    z-index: 1;
}

/* Circle effect removed as requested */
.btn-mystical::before {
    display: none;
}

.btn-mystical:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

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

/* Secondary Button (Outline/Teal) */
.btn-ethereal {
    background: transparent;
    border: 1px solid var(--accent-structural);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.btn-ethereal:hover {
    background: rgba(58, 95, 111, 0.15);
    border-color: var(--accent-teal-light);
    color: #fff;
    box-shadow: 0 0 15px rgba(58, 95, 111, 0.3);
}

/* ==========================================
   CARDS & CONTAINERS
   ========================================== */

/* High-elevation card for primary modules */
.card-elevated {
    position: relative;
    background: rgba(20, 30, 42, 0.7);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid rgba(199, 164, 74, 0.15);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-elevated);
    padding: var(--space-xl);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* overflow: hidden; Removed to allow dropdowns to show */
}

.card-elevated::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(199, 164, 74, 0.1), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    /* Critical Fix: Prevent blocking form inputs */
}

.card-elevated:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-floating), 0 0 30px rgba(199, 164, 74, 0.15);
    border-color: rgba(199, 164, 74, 0.4);
}

.card-elevated:hover::after {
    opacity: 1;
}

/* Floating info card (smaller) */
.card-floating {
    background: rgba(14, 22, 33, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
}

/* ==========================================
   FORM ELEMENTS
   ========================================== */

/* Modern Input Field */
.input-mystic-wrapper {
    position: relative;
    width: 100%;
}

.input-mystic {
    width: 100%;
    background: rgba(20, 30, 42, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    padding-right: 48px;
    /* Space for icon on the right */
    padding-left: 16px;
    /* Standard padding on the left */
    /* Space for icon */
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
}

.input-mystic:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(199, 164, 74, 0.1), var(--shadow-md);
    background: rgba(20, 30, 42, 0.8);
}

.input-mystic:hover:not(:focus) {
    border-color: rgba(199, 164, 74, 0.3);
}

.input-icon {
    position: absolute;
    right: 14px;
    /* Icon on the right */
    left: auto;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: color 0.3s ease;
    width: 20px;
    height: 20px;
    pointer-events: none;
    z-index: 2;
    /* Ensure icon is above input background but below text cursor conceptually if needed, though pointer-events:none handles clicks */
}

.input-mystic:focus+.input-icon {
    color: var(--accent-gold);
}

/* Select Dropdown */
.select-mystic {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23C7A44A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: right 12px center;
    background-size: 20px;
    background-repeat: no-repeat;
    padding-right: 44px;
}

/* ==========================================
   NAVIGATION
   ========================================== */

/* Floating Navigation Bar */
.nav-floating {
    background: rgba(14, 22, 33, 0.85);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-2xl);
    padding: 12px 24px;
    margin: 20px auto;
    max-width: 1200px;
    width: 90%;
    box-shadow: var(--shadow-elevated);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 20px;
    z-index: var(--z-nav);
    transition: transform 0.3s ease, background 0.3s ease;
}

.nav-floating.scrolled {
    background: rgba(14, 22, 33, 0.95);
    box-shadow: var(--shadow-floating);
    width: 95%;
}

.nav-link-modern {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link-modern:hover {
    color: var(--accent-gold);
    background: rgba(199, 164, 74, 0.05);
}

.nav-link-modern:hover::after {
    width: 80%;
}

/* ==========================================
   TYPOGRAPHY COMPONENTS
   ========================================== */

.hero-title-modern {
    font-family: var(--font-display);
    font-size: var(--fluid-2xl);
    background: linear-gradient(to bottom, #FFF 0%, #EFE9DC 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.gradient-text-gold {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ==========================================
   LOADING STATES
   ========================================== */

.spinner-mystic {
    border: 3px solid rgba(199, 164, 74, 0.1);
    border-left-color: var(--accent-gold);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px;
}

/* ==========================================
   ASTROLOGY ICONS (PNGs)
   ========================================== */

.astro-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
}

.astro-icon-sm {
    width: 16px;
    height: 16px;
}

.astro-icon-lg {
    width: 32px;
    height: 32px;
}

.astro-icon-xl {
    width: 48px;
    height: 48px;
}

/* For result tables */
.astro-icon-inline {
    width: 20px;
    height: 20px;
    margin-right: 6px;
    position: relative;
    top: -1px;
}