/* Candicab Sweet Motion Lite - Custom CSS */
/* Animation Keyframes, Overrides & Prose Styling */

/* ========================================
   Global Overflow Control
======================================== */
html,
body {
    overflow-x: clip;
    overflow-y: auto;
}

/* ========================================
   Animation Keyframes
======================================== */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Tilt Animation - Subtle hover effect */
@keyframes tilt {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-1deg);
    }
    75% {
        transform: rotate(1deg);
    }
}

.animate-tilt {
    animation: tilt 4s ease-in-out infinite;
}

.animate-tilt:hover {
    animation-play-state: paused;
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Parallax effect via CSS */
@keyframes parallaxFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-0.625rem);
    }
}

.animate-parallax {
    animation: parallaxFloat 6s ease-in-out infinite;
}

/* Gentle pulse for badges */
@keyframes gentlePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(232, 93, 117, 0.4);
    }
    50% {
        box-shadow: 0 0 0 0.625rem rgba(232, 93, 117, 0);
    }
}

.animate-pulse-gentle {
    animation: gentlePulse 2s ease-in-out infinite;
}

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-1.875rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(1.875rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* ========================================
   Table Responsive Wrapper
======================================== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 100%;
}

/* ========================================
   Prose Styling for Markdown Content
======================================== */
.prose {
    color: #d1d5db;
    line-height: 1.75;
    max-width: 100%;
}

/* Headings */
.prose h2 {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(232, 93, 117, 0.2);
}

.prose h3 {
    color: #f3f4f6;
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.prose h4 {
    color: #e5e7eb;
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Paragraphs */
.prose p {
    margin-bottom: 1.25rem;
    color: #d1d5db;
}

.prose p:first-of-type {
    font-size: 1.0625rem;
}

/* Links */
.prose a {
    color: #e85d75;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #f8a5b6;
    text-decoration: underline;
}

/* Strong and emphasis */
.prose strong {
    color: #ffffff;
    font-weight: 600;
}

.prose em {
    color: #e5e7eb;
    font-style: italic;
}

/* Lists - Unordered */
.prose ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.prose ul li {
    color: #d1d5db;
    margin-bottom: 0.5rem;
    padding-left: 0.375rem;
}

.prose ul li::marker {
    color: #e85d75;
}

/* Lists - Ordered */
.prose ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.prose ol li {
    color: #d1d5db;
    margin-bottom: 0.5rem;
    padding-left: 0.375rem;
}

.prose ol li::marker {
    color: #e85d75;
    font-weight: 600;
}

/* Nested lists */
.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid #e85d75;
    padding-left: 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #9ca3af;
    background: rgba(232, 93, 117, 0.05);
    padding: 1rem 1.25rem;
    border-radius: 0 0.5rem 0.5rem 0;
}

.prose blockquote p {
    margin-bottom: 0;
}

/* Tables */
.prose .table-responsive {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    border: 1px solid rgba(232, 93, 117, 0.2);
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.prose thead {
    background: #1a1225;
}

.prose th {
    color: #d1d5db;
    font-weight: 600;
    text-align: left;
    padding: 0.875rem 1rem;
    border-bottom: 2px solid rgba(232, 93, 117, 0.2);
}

.prose tbody tr {
    border-bottom: 1px solid rgba(232, 93, 117, 0.1);
    transition: background 0.2s ease;
}

.prose tbody tr:hover {
    background: rgba(232, 93, 117, 0.05);
}

.prose td {
    padding: 0.875rem 1rem;
    color: #d1d5db;
}

.prose tbody tr:last-child {
    border-bottom: none;
}

/* Code blocks */
.prose code {
    background: rgba(232, 93, 117, 0.1);
    color: #f8a5b6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Fira Code', 'Monaco', monospace;
}

.prose pre {
    background: #1a1225;
    border: 1px solid rgba(232, 93, 117, 0.2);
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
    color: #d1d5db;
}

/* Horizontal rule */
.prose hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(232, 93, 117, 0.3), transparent);
    margin: 2.5rem 0;
}

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    border: 1px solid rgba(232, 93, 117, 0.2);
}

/* Figure captions */
.prose figcaption {
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ========================================
   Additional Utility Classes
======================================== */

/* Focus states for accessibility */
.prose a:focus {
    outline: 2px solid #e85d75;
    outline-offset: 2px;
}

/* Selection styling */
.prose ::selection {
    background: rgba(232, 93, 117, 0.3);
    color: #ffffff;
}

/* ========================================
   Responsive Adjustments
======================================== */
@media (max-width: 48rem) {
    .prose h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
        margin-top: 1.5rem;
    }
    
    .prose {
        font-size: 0.9375rem;
    }
    
    .prose ul,
    .prose ol {
        padding-left: 1.25rem;
    }
    
    .prose blockquote {
        padding: 0.75rem 1rem;
    }
    
    .prose th,
    .prose td {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ========================================
   Print Styles
======================================== */
@media print {
    .prose {
        color: #000000;
    }
    
    .prose a {
        color: #000000;
        text-decoration: underline;
    }
    
    .prose blockquote {
        border-left-color: #000000;
    }
}
