/*
Theme Name: Siral Americas
Theme URI: https://siralusa.com/
Author: Siral Americas Engineering
Author URI: https://siralusa.com/
Description: Custom theme that replicates the Siral-Private React application inside WordPress, including admin product management, CSV import, calculators, and the complete front-end experience.
Version: 0.1.0
Requires at least: 6.6
Tested up to: 6.7
Requires PHP: 8.1
License: Proprietary
Text Domain: siral
*/
html {
    scroll-behavior: smooth;
}

/* Override Tailwind Red Colors to Brand Red #990000 */
.bg-red-50,
.bg-red-100,
.bg-red-200,
.bg-red-300,
.bg-red-400,
.bg-red-500,
.bg-red-600,
.bg-red-700,
.bg-red-800,
.bg-red-900 {
    background-color: #990000 !important;
}

.text-red-50,
.text-red-100,
.text-red-200,
.text-red-300,
.text-red-400,
.text-red-500,
.text-red-600,
.text-red-700,
.text-red-800,
.text-red-900 {
    color: #990000 !important;
}

.border-red-50,
.border-red-100,
.border-red-200,
.border-red-300,
.border-red-400,
.border-red-500,
.border-red-600,
.border-red-700,
.border-red-800,
.border-red-900 {
    border-color: #990000 !important;
}

.hover\:bg-red-50:hover,
.hover\:bg-red-100:hover,
.hover\:bg-red-200:hover,
.hover\:bg-red-300:hover,
.hover\:bg-red-400:hover,
.hover\:bg-red-500:hover,
.hover\:bg-red-600:hover,
.hover\:bg-red-700:hover,
.hover\:bg-red-800:hover,
.hover\:bg-red-900:hover {
    background-color: #990000 !important;
}

.hover\:text-red-50:hover,
.hover\:text-red-100:hover,
.hover\:text-red-200:hover,
.hover\:text-red-300:hover,
.hover\:text-red-400:hover,
.hover\:text-red-500:hover,
.hover\:text-red-600:hover,
.hover\:text-red-700:hover,
.hover\:text-red-800:hover,
.hover\:text-red-900:hover {
    color: #990000 !important;
}

.focus\:ring-red-50:focus,
.focus\:ring-red-100:focus,
.focus\:ring-red-200:focus,
.focus\:ring-red-300:focus,
.focus\:ring-red-400:focus,
.focus\:ring-red-500:focus,
.focus\:ring-red-600:focus,
.focus\:ring-red-700:focus,
.focus\:ring-red-800:focus,
.focus\:ring-red-900:focus {
    --tw-ring-color: #990000 !important;
}

.focus\:border-red-50:focus,
.focus\:border-red-100:focus,
.focus\:border-red-200:focus,
.focus\:border-red-300:focus,
.focus\:border-red-400:focus,
.focus\:border-red-500:focus,
.focus\:border-red-600:focus,
.focus\:border-red-700:focus,
.focus\:border-red-800:focus,
.focus\:border-red-900:focus {
    border-color: #990000 !important;
}

.ring-red-50,
.ring-red-100,
.ring-red-200,
.ring-red-300,
.ring-red-400,
.ring-red-500,
.ring-red-600,
.ring-red-700,
.ring-red-800,
.ring-red-900 {
    --tw-ring-color: #990000 !important;
}

/* Custom scrollbar hiding utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Prose styles for blog post content */
.prose {
    color: #334155;
    line-height: 1.75;
}

.prose h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    color: #1e293b;
}

.prose h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    color: #1e293b;
}

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose ul,
.prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

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

.prose a:hover {
    color: #990000;
}

.prose strong {
    font-weight: 600;
    color: #1e293b;
}

.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.prose blockquote {
    border-left: 4px solid #990000;
    padding-left: 1em;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
    font-style: italic;
    color: #64748b;
}

.prose code {
    background-color: #f1f5f9;
    padding: 0.125em 0.375em;
    border-radius: 0.25rem;
    font-size: 0.875em;
    color: #990000;
}

.prose pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1em;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-top: 1.5em;
    margin-bottom: 1.5em;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Custom tiny scrollbar for a more subtle, modern look */
.tiny-scrollbar::-webkit-scrollbar {
    width: 4px;
    /* for vertical scrollbars */
    height: 4px;
    /* for horizontal scrollbars */
}

.tiny-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.tiny-scrollbar::-webkit-scrollbar-thumb {
    background: #990000;
    /* red-700 */
    border-radius: 4px;
}

.tiny-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #990000;
    /* red-800 */
}

/* For Firefox */
.tiny-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #990000 transparent;
    /* red-700 */
}

/* Custom animation for chatbot launcher */
@keyframes pulse-slow {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(153, 0, 0, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(153, 0, 0, 0);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 2.5s infinite;
}

/* --- Glassmorphism & Animation Styles --- */

/* 1. Glass Effect Class */
.glass-element {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

/* 2. Scroll Animation Classes */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Button Styles matching Siral-Private */
.button {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
}

.button-primary {
    background-color: #990000;
    color: #ffffff;
}

.button-primary:hover {
    background-color: #990000;
    color: #ffffff;
}

.button-secondary {
    background-color: #ffffff;
    color: #990000;
    border: 1px solid #990000;
}

.button-secondary:hover {
    background-color: #990000;
    color: #ffffff;
}

/* Products Dropdown */
.products-menu.open .products-dropdown {
    display: block !important;
}

.products-dropdown {
    z-index: 50;
    transition: opacity 0.2s ease-in-out;
}

.products-dropdown.pointer-events-none {
    pointer-events: none;
}

.products-dropdown.pointer-events-auto {
    pointer-events: auto;
}

/* FAQ Accordion */
.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Admin Styles */
.siral-admin-app {
    font-family: 'Inter', sans-serif;
}

.siral-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.siral-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.siral-field__label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
}

.siral-field input,
.siral-field textarea,
.siral-field select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.siral-field input:focus,
.siral-field textarea:focus,
.siral-field select:focus {
    outline: none;
    border-color: #990000;
    box-shadow: 0 0 0 3px rgba(153, 0, 0, 0.1);
}

/* Importer Styles */
.siral-upload-container {
    max-width: 800px;
    margin: 2rem auto;
}

.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 3rem;
    text-align: center;
    background: #f9fafb;
    transition: all 0.3s;
}

.upload-area:hover {
    border-color: #990000;
    background: #fef2f2;
}

.upload-icon {
    margin: 0 auto 1rem;
    color: #6b7280;
}

.upload-text {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.upload-subtext {
    color: #6b7280;
    margin: 0.5rem 0;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: #990000;
    transition: width 0.3s ease;
}

/* Product Cards */
.product-card,
.product-list-item {
    transition: all 0.3s ease;
}

.product-card:hover,
.product-list-item:hover {
    transform: translateY(-2px);
}

/* Mobile Menu */
#mobile-menu {
    transition: all 0.3s ease;
}

/* Filter Drawer */
#mobile-filter-drawer {
    transition: opacity 0.3s ease;
}

/* Custom Toast/Alert Animations */
@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes scale-in {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

.animate-slide-out {
    animation: slide-out 0.3s ease-in;
}

.animate-scale-in {
    animation: scale-in 0.2s ease-out;
}

/* Toast Notification Styles */
#siral-toast {
    transition: all 0.3s ease;
}

#siral-toast .bg-white {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

#toast-icon {
    color: #990000;
}

#siral-toast.success #toast-icon {
    color: #16a34a;
}

#siral-toast.error #toast-icon {
    color: #990000;
}

#siral-toast.warning #toast-icon {
    color: #f59e0b;
}

#siral-toast.info #toast-icon {
    color: #3b82f6;
}

/* Confirm Dialog Styles */
#siral-confirm-dialog {
    backdrop-filter: blur(4px);
}

/* Promotional Banner Modal Animations */
@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scale-in-bounce {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(30px) rotate(-2deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.02) translateY(-5px) rotate(1deg);
    }

    70% {
        transform: scale(0.98) translateY(0) rotate(-0.5deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0) rotate(0deg);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0;
        transform: translate(0, 0) scale(0) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: translate(var(--tx), var(--ty)) scale(1.5) rotate(180deg);
    }
}

@keyframes ping-slow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0;
    }
}

.animate-fade-in {
    animation: fade-in 0.4s ease-out;
}

.animate-scale-in-bounce {
    animation: scale-in-bounce 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-slide-up {
    animation: slide-up 0.6s ease-out 0.3s both;
}

.animate-slide-up-delay {
    animation: slide-up 0.6s ease-out 0.5s both;
}

.animate-slide-up-delay-2 {
    animation: slide-up 0.6s ease-out 0.7s both;
}

.animate-ping-slow {
    animation: ping-slow 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Promotional Banner Modal Styles */
#promotional-banner-modal {
    backdrop-filter: blur(8px);
}

#promotional-banner-modal .bg-white {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#banner-image-container {
    position: relative;
}

#banner-modal-image {
    transition: transform 0.4s ease, opacity 0.5s ease;
}

/* Sparkle Animation */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.8);
    animation: sparkle 3s infinite;
}

.sparkle-1 {
    top: 20%;
    left: 15%;
    --tx: 20px;
    --ty: -15px;
    animation-delay: 0s;
}

.sparkle-2 {
    top: 60%;
    right: 20%;
    --tx: -15px;
    --ty: 20px;
    animation-delay: 1.5s;
}

/* Banner CTA Button */
#banner-modal-cta {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(153, 0, 0, 0.4);
}

#banner-modal-cta:hover {
    box-shadow: 0 15px 30px -5px rgba(153, 0, 0, 0.6);
}

/* View Toggle Buttons */
#view-grid.active,
#view-list.active {
    background-color: #990000;
    color: white;
    border-color: #990000;
}

#view-grid.active:hover,
#view-list.active:hover {
    background-color: #770000;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #promotional-banner-modal .max-w-md {
        margin: 1rem;
    }

    #banner-image-container {
        height: 180px;
    }
}