@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Bebas+Neue&family=Oswald:wght@400;500;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
    body {
        @apply bg-brand-cream text-brand-dark antialiased;
    }
}

/* Prevent Livewire loading elements from displaying while idle */
[wire\:loading],
[wire\:loading\.delay],
[wire\:loading\.inline-block],
[wire\:loading\.inline],
[wire\:loading\.block],
[wire\:loading\.flex],
[wire\:loading\.table],
[wire\:loading\.grid],
[wire\:loading\.inline-flex] {
    display: none !important;
}

/* Animated Loading & Confirmation Text */
@keyframes bakiesPulseText {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.72;
        transform: scale(0.985);
    }
}

@keyframes bakiesDotBounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.35;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@keyframes bakiesPopIn {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animated-loading-text {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    animation: bakiesPulseText 1.6s ease-in-out infinite;
}

.animated-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 2px;
}

.animated-dots .dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 9999px;
    background-color: currentColor;
    animation: bakiesDotBounce 1.2s infinite ease-in-out both;
}

.animated-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.animated-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.animated-dots .dot:nth-child(3) { animation-delay: 0s; }

.animated-pop-in {
    animation: bakiesPopIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* TipTap Editor Styles */
.tiptap p.is-editor-empty:first-child::before {
    color: #9ca3af;
    content: attr(data-placeholder);
    float: left;
    height: 0;
    pointer-events: none;
}
.tiptap {
    outline: none !important;
}
.tiptap ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}
.tiptap ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}
.tiptap h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.75rem 0 0.25rem;
    color: #1f2937;
}
.tiptap h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0 0.25rem;
    color: #374151;
}
.tiptap blockquote {
    border-left: 3px solid #f472b6;
    padding-left: 1rem;
    font-style: italic;
    color: #4b5563;
    margin: 0.75rem 0;
}

/* Storefront Rich Description Styles (TipTap HTML output) */
.product-description,
.prose {
    color: #4b5563;
    font-size: 1.05rem;
    line-height: 1.8;
}

.product-description p,
.prose p {
    margin-bottom: 1.15rem !important;
    line-height: 1.8 !important;
}

.product-description p:last-child,
.prose p:last-child {
    margin-bottom: 0 !important;
}

.product-description h1,
.prose h1 {
    font-size: 1.85rem !important;
    font-weight: 800 !important;
    color: #1f2937 !important;
    margin-top: 1.75rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.25 !important;
}

.product-description h2,
.prose h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.3 !important;
}

.product-description h3,
.prose h3 {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.35 !important;
}

.product-description h4,
.prose h4 {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.4 !important;
}

.product-description ul,
.prose ul {
    list-style-type: disc !important;
    padding-left: 1.75rem !important;
    margin-top: 0.85rem !important;
    margin-bottom: 1.25rem !important;
}

.product-description ol,
.prose ol {
    list-style-type: decimal !important;
    padding-left: 1.75rem !important;
    margin-top: 0.85rem !important;
    margin-bottom: 1.25rem !important;
}

.product-description li,
.prose li {
    margin-bottom: 0.5rem !important;
    line-height: 1.65 !important;
    padding-left: 0.25rem !important;
    display: list-item !important;
    list-style-type: disc !important;
}

.product-description ol li,
.prose ol li {
    list-style-type: decimal !important;
}

.product-description li::marker,
.prose li::marker {
    color: #FF6969 !important;
    font-size: 1.15em !important;
}

.product-description strong,
.product-description b,
.prose strong,
.prose b {
    font-weight: 700 !important;
    color: #1f2937 !important;
}

.product-description em,
.product-description i,
.prose em,
.prose i {
    font-style: italic !important;
}

.product-description u,
.prose u {
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
}

.product-description blockquote,
.prose blockquote {
    border-left: 4px solid #FF6969 !important;
    background-color: #FFF5F2 !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 0.5rem !important;
    margin: 1.25rem 0 !important;
    font-style: italic !important;
    color: #374151 !important;
}

.product-description a,
.prose a {
    color: #FF6969 !important;
    text-decoration: underline !important;
    font-weight: 600 !important;
    transition: color 0.2s !important;
}

.product-description a:hover,
.prose a:hover {
    color: #FEB6D3 !important;
}
