/*
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
*/

/* 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: #dc2626;
    text-decoration: underline;
}

.prose a:hover {
    color: #991b1b;
}

.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 #dc2626;
    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: #dc2626;
}

.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: #b91c1c; /* red-700 */
    border-radius: 4px;
}
.tiny-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #991b1b; /* red-800 */
}
/* For Firefox */
.tiny-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #b91c1c transparent; /* red-700 */
}

/* Custom animation for chatbot launcher */
@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(185, 28, 28, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(185, 28, 28, 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: #b91c1c;
    color: #ffffff;
}
.button-primary:hover {
    background-color: #991b1b;
    color: #ffffff;
}
.button-secondary {
    background-color: #ffffff;
    color: #b91c1c;
    border: 1px solid #b91c1c;
}
.button-secondary:hover {
    background-color: #b91c1c;
    color: #ffffff;
}

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

/* 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: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 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: #b91c1c;
    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: #b91c1c;
    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: #dc2626;
}

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

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

#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(185, 28, 28, 0.4);
}

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

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