/* Custom styles for Kris Kringle - Dark Forest Theme */

/* Import decorative font for title */
@import url('https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@400;700&display=swap');

/* CSS Variables for theme colors */
:root {
    --kk-dark-bg: #0d1f12;
    --kk-card-bg: rgba(13, 31, 18, 0.85);
    --kk-card-border: rgba(34, 197, 94, 0.2);
    --kk-green-primary: #22c55e;
    --kk-green-hover: #16a34a;
    --kk-green-dark: #15803d;
    --kk-gold: #f59e0b;
    --kk-gold-light: #fbbf24;
    --kk-text-primary: #ffffff;
    --kk-text-secondary: rgba(255, 255, 255, 0.7);
    --kk-text-muted: rgba(255, 255, 255, 0.5);
    --kk-input-bg: rgba(0, 0, 0, 0.3);
    --kk-input-border: rgba(255, 255, 255, 0.2);
    --kk-input-focus: rgba(34, 197, 94, 0.5);
}

/* Dark forest background */
body {
    background: var(--kk-dark-bg);
    background-image:
        linear-gradient(to bottom, rgba(0, 20, 10, 0.7), rgba(0, 20, 10, 0.9)),
        url('/images/ChristmasTrees_Lights.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--kk-text-primary);
}

/* Remove old emoji background */
body::before {
    display: none;
}

/* Decorative title font */
.kk-title {
    font-family: 'Mountains of Christmas', cursive;
    color: var(--kk-green-primary);
    text-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

/* Card styling - dark glass effect */
.kk-card {
    background: var(--kk-card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--kk-card-border);
    border-radius: 1rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Form inputs - dark theme */
.kk-input {
    background: var(--kk-input-bg);
    border: 1px solid var(--kk-input-border);
    color: var(--kk-text-secondary);
    border-radius: 0.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* Date input calendar icon */
.kk-input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
}

.kk-input::placeholder {
    color: var(--kk-text-muted);
}

.kk-input:focus {
    outline: none;
    border-color: var(--kk-green-primary);
    box-shadow: 0 0 0 3px var(--kk-input-focus);
}

/* Select dropdowns */
.kk-select {
    background: var(--kk-input-bg);
    border: 1px solid var(--kk-input-border);
    color: var(--kk-text-secondary);
    border-radius: 0.5rem;
}

.kk-select option {
    background: #1a2e1f;
    color: var(--kk-text-secondary);
}

/* Primary button - deep green */
.kk-btn-primary {
    background: linear-gradient(to bottom, #16a34a, #15803d);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(21, 128, 61, 0.4);
}

.kk-btn-primary:hover {
    background: linear-gradient(to bottom, #15803d, #166534);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(21, 128, 61, 0.5);
}

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

/* Secondary button - outline */
.kk-btn-secondary {
    background: transparent;
    border: 1px solid var(--kk-input-border);
    color: var(--kk-text-secondary);
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.kk-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Step indicator styling */
.kk-step-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--kk-card-border);
}

.kk-step {
    display: flex;
    align-items: center;
}

.kk-step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.kk-step-number.active {
    background: var(--kk-green-primary);
    color: rgba(255, 255, 255, 0.85);
}

.kk-step-number.completed {
    background: var(--kk-green-primary);
    color: rgba(255, 255, 255, 0.85);
}

.kk-step-number.pending {
    background: rgba(255, 255, 255, 0.1);
    color: var(--kk-text-muted);
    border: 1px dashed var(--kk-text-muted);
}

.kk-step-label {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.kk-step-line {
    flex: 1;
    height: 0;
    border-top: 2px dashed var(--kk-text-muted);
    margin: 0 0.75rem;
}

.kk-step-line.completed {
    border-color: var(--kk-green-primary);
    border-style: solid;
}

/* Text colors for dark theme */
.kk-text-primary {
    color: var(--kk-text-primary);
}

.kk-text-secondary {
    color: var(--kk-text-secondary);
}

.kk-text-muted {
    color: var(--kk-text-muted);
}

/* Link styling */
.kk-link {
    color: var(--kk-green-primary);
    transition: color 0.2s;
}

.kk-link:hover {
    color: var(--kk-green-hover);
}

/* Smooth transitions */
[x-cloak] {
    display: none !important;
}

/* Info/stat boxes */
.kk-stat-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.kk-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--kk-green-primary);
}

.kk-stat-label {
    font-size: 0.875rem;
    color: var(--kk-text-secondary);
}

/* Table styling for dark theme */
.kk-table {
    width: 100%;
}

.kk-table thead {
    background: rgba(0, 0, 0, 0.3);
}

.kk-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--kk-text-secondary);
    font-size: 0.875rem;
}

.kk-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.kk-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.kk-table td {
    padding: 0.75rem 1rem;
}

/* Status badges */
.badge-sent {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge-viewed {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.badge-manual {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--kk-text-secondary);
}

/* Code/mono styling */
.kk-code {
    font-family: ui-monospace, monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

/* Divider */
.kk-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Alert/warning styling */
.kk-alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fbbf24;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.kk-alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

.kk-alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}

/* Confetti animation for reveal page */
@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    top: 0;
    animation: confetti-fall 3s ease-out forwards;
    pointer-events: none;
}

/* Reveal animation */
@keyframes reveal {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.reveal-animation {
    animation: reveal 0.6s ease-out forwards;
}

/* Pulse animation for important elements */
@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.pulse-ring {
    animation: pulse-ring 2s infinite;
}

/* Loading skeleton for dark theme */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* Card hover effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Modal overlay */
.kk-modal-overlay {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

/* Toast notification */
.kk-toast {
    background: rgba(30, 41, 59, 0.95);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive table for dark theme */
@media (max-width: 640px) {
    .responsive-table {
        display: block;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 0.5rem;
        padding: 1rem;
        border: none;
    }

    .responsive-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border: none;
    }

    .responsive-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--kk-text-secondary);
    }
}

/* Exclusion card styling */
.kk-exclusion-card {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0.75rem;
    padding: 1rem;
}

/* Quick add textarea */
.kk-quick-add {
    background: var(--kk-input-bg);
    border: 1px solid var(--kk-input-border);
    color: var(--kk-text-primary);
    font-family: ui-monospace, monospace;
}

/* Footer styling */
.kk-footer {
    color: var(--kk-text-muted);
    font-size: 0.875rem;
}
