/**
 * ORMR Stake - Custom CSS Utilities
 * Design System: Coral/Orange primary, Cerulean secondary, Cream backgrounds
 */

/* =================================================================
   CSS VARIABLES - Single Source of Truth for Colors
   ================================================================= */

:root {
    /* Primary Colors */
    --color-coral: #FF6B6B;
    --color-orange: #FF8C42;
    --color-cerulean: #3EACB0;
    --color-cerulean-dark: #307B7F;
    --color-green: #4D9A7F;
    --color-green-dark: #3D8C88;
    --color-navy: #2D3142;
    --color-slate: #4F5D75;
    --color-cream: #F4E8C1;
    --color-error: #A3333D;
    --color-warning: #C85E38;

    /* Gradients */
    --gradient-coral: linear-gradient(135deg, var(--color-coral) 0%, var(--color-orange) 100%);
    --gradient-cerulean: linear-gradient(135deg, var(--color-cerulean) 0%, var(--color-cerulean-dark) 100%);
    --gradient-green: linear-gradient(135deg, var(--color-green) 0%, var(--color-green-dark) 100%);
    --gradient-navy: linear-gradient(135deg, var(--color-navy) 0%, var(--color-slate) 100%);

    /* Shadows */
    --glow-coral: 0 4px 20px rgba(255, 107, 107, 0.3);
    --glow-coral-hover: 0 6px 30px rgba(255, 107, 107, 0.4);
    --glow-cerulean: 0 4px 20px rgba(62, 172, 176, 0.3);
    --glow-cerulean-hover: 0 6px 30px rgba(62, 172, 176, 0.4);
    --glow-green: 0 4px 20px rgba(77, 154, 127, 0.3);
}

/* =================================================================
   GRADIENTS
   ================================================================= */

/* Primary CTA - coral to bright orange */
.gradient-coral {
    background: var(--gradient-coral);
}

.gradient-coral-text {
    background: var(--gradient-coral);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Secondary - cerulean for participation */
.gradient-cerulean {
    background: var(--gradient-cerulean);
}

/* Success - green for rewards */
.gradient-green {
    background: var(--gradient-green);
}

/* Dark sections */
.gradient-navy {
    background: var(--gradient-navy);
}

/* =================================================================
   GLOW EFFECTS
   ================================================================= */

.glow-coral {
    box-shadow: var(--glow-coral);
}

.glow-coral:hover {
    box-shadow: var(--glow-coral-hover);
}

.glow-cerulean {
    box-shadow: var(--glow-cerulean);
}

.glow-cerulean:hover {
    box-shadow: var(--glow-cerulean-hover);
}

.glow-green {
    box-shadow: var(--glow-green);
}

/* Text glows */
.apy-glow {
    text-shadow: 0 0 40px rgba(255, 107, 107, 0.3);
}

.rewards-glow {
    text-shadow: 0 0 40px rgba(77, 154, 127, 0.4);
}

.treasury-glow {
    text-shadow: 0 0 40px rgba(62, 172, 176, 0.3);
}

/* =================================================================
   HEADER
   ================================================================= */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5rem;
    background: white;
    border-bottom: 1px solid rgba(45, 49, 66, 0.05);
    padding: 0 1.5rem;
    z-index: 1000;
    display: flex;
    align-items: center;
}

nav {
    max-width: 80rem;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.logo-ormr {
    color: #2D3142;
}

.logo-stake {
    background: var(--gradient-coral);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* =================================================================
   CARDS
   ================================================================= */

.stat-card {
    background: white;
    box-shadow: 0 1px 3px rgba(45, 49, 66, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    box-shadow: 0 8px 30px rgba(45, 49, 66, 0.12);
}

/* =================================================================
   BACK LINK
   ================================================================= */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-coral);
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: color 0.3s;
    text-decoration: none;
}

.back-link:hover {
    color: var(--color-orange);
}

/* Cerulean back link (replaces inline onmouseover/onmouseout) */
.back-link-cerulean {
    color: var(--color-slate);
    text-decoration: none;
}

.back-link-cerulean:hover {
    color: var(--color-cerulean);
}

/* =================================================================
   STATUS BADGES
   ================================================================= */

.badge-active {
    background: rgba(77, 154, 127, 0.1);
    color: #4D9A7F;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-paused {
    background: rgba(200, 94, 56, 0.1);
    color: #C85E38;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* =================================================================
   TOKEN BADGE
   ================================================================= */

.token-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(62, 172, 176, 0.1);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3EACB0;
}

/* =================================================================
   POOL AVATARS
   ================================================================= */

.pool-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pool-avatar span {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: white;
    font-size: 1.125rem;
}

.pool-avatar-coral {
    background: var(--gradient-coral);
}

.pool-avatar-cerulean {
    background: var(--gradient-cerulean);
}

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

.btn-primary {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    background: var(--gradient-coral);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    box-shadow: var(--glow-coral);
}

.btn-primary:hover {
    opacity: 0.9;
    box-shadow: var(--glow-coral-hover);
}

.btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    background: white;
    color: #2D3142;
    border: 1px solid rgba(45, 49, 66, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: rgba(45, 49, 66, 0.05);
}

.btn-secondary:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 49, 66, 0.1);
}

/* Cerulean variant for participation actions */
.btn-cerulean {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    background: var(--gradient-cerulean);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    box-shadow: var(--glow-cerulean);
}

.btn-cerulean:hover {
    opacity: 0.9;
    box-shadow: var(--glow-cerulean-hover);
}

.btn-cerulean:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(62, 172, 176, 0.2);
}

.btn-ghost {
    background: transparent;
    color: #4F5D75;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-ghost:hover {
    background: rgba(45, 49, 66, 0.05);
    color: #2D3142;
}

/* Tertiary (Navy) */
.btn-navy {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    background: var(--gradient-navy);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-navy:hover {
    opacity: 0.9;
}

/* Outline button */
.btn-outline {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    background: white;
    color: #2D3142;
    border: 1px solid rgba(45, 49, 66, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: rgba(45, 49, 66, 0.05);
}

/* Disabled button */
.btn-disabled {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    background: #BFC0C0;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-size: 1rem;
    cursor: not-allowed;
}

/* Max amount button (replaces inline onmouseover/onmouseout) */
.btn-max-amount {
    background: rgba(45, 49, 66, 0.08);
    color: var(--color-slate);
}

.btn-max-amount:hover {
    background: rgba(45, 49, 66, 0.15);
}

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

.nav-link {
    color: #4F5D75;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #2D3142;
}

.nav-link.active {
    color: #2D3142;
    border-bottom: 2px solid #FF6B6B;
    padding-bottom: 0.25rem;
}

/* Sidebar navigation */
.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: rgba(45, 49, 66, 0.05);
}

.nav-item.active {
    background: var(--gradient-coral);
    color: white;
    box-shadow: var(--glow-coral);
}

/* =================================================================
   INPUTS
   ================================================================= */

.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(45, 49, 66, 0.1);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.input:focus {
    outline: none;
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.input-cerulean:focus {
    border-color: #3EACB0;
    box-shadow: 0 0 0 3px rgba(62, 172, 176, 0.15);
}

/* Standalone focus utilities (for non-.input elements) */
.input-focus:focus {
    border-color: var(--color-coral);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.input-focus-cerulean:focus {
    border-color: var(--color-cerulean);
    box-shadow: 0 0 0 3px rgba(62, 172, 176, 0.15);
}

/* Input with cerulean focus (replaces inline onfocus/onblur) */
.input-cerulean-focus {
    transition: all 0.2s ease;
}

.input-cerulean-focus:focus {
    border-color: var(--color-cerulean) !important;
    box-shadow: 0 0 0 3px rgba(62, 172, 176, 0.12) !important;
    background: white !important;
}

/* =================================================================
   TABLES
   ================================================================= */

.table-row {
    transition: background 0.15s;
}

.table-row:hover {
    background: rgba(255, 107, 107, 0.04);
}

.table-row-cerulean:hover {
    background: rgba(62, 172, 176, 0.04);
}

/* =================================================================
   TOOLTIPS
   ================================================================= */

.tooltip {
    position: relative;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2D3142;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    margin-bottom: 8px;
    transition: opacity 0.2s;
    z-index: 10;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #2D3142;
}

/* =================================================================
   SKELETON LOADING
   ================================================================= */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =================================================================
   SELECT DROPDOWN
   ================================================================= */

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%234F5D75'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 3rem;
}

/* =================================================================
   FULL WIDTH BACKGROUND (breaks out of container)
   ================================================================= */

.full-width-bg {
    position: relative;
}

.full-width-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

.full-width-bg.bg-cream::before {
    background-color: #F4E8C1;
}

.full-width-bg.bg-white::before {
    background-color: white;
}
