/* Processit Odoo Website - Additional Custom Styles */
/* This file contains any additional styles not covered by TailwindCSS CDN */

/* Loading animations */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #875A7B;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Form validation styles */
.form-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-success {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Notification styles */
.notification {
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 1px solid #875A7B !important;
        background: transparent !important;
        color: #875A7B !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid #000;
    }
    
    .btn-secondary {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for accessibility */
.btn-primary:focus,
.btn-secondary:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #875A7B;
    outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #875A7B;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #875A7B;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6B4C57;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for iOS Safari button styling */
input[type="submit"],
input[type="button"],
button {
    -webkit-appearance: none;
    appearance: none;
    border-radius: 0;
}

/* Ensure proper text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhanced Mobile Responsiveness */
/* Mobile-first responsive design improvements */

/* Container responsive padding */
.container-custom {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-custom {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Responsive text scaling */
.responsive-text-xs { font-size: 0.75rem; }
.responsive-text-sm { font-size: 0.875rem; }
.responsive-text-base { font-size: 1rem; }
.responsive-text-lg { font-size: 1.125rem; }
.responsive-text-xl { font-size: 1.25rem; }

@media (min-width: 640px) {
    .responsive-text-xs { font-size: 0.875rem; }
    .responsive-text-sm { font-size: 1rem; }
    .responsive-text-base { font-size: 1.125rem; }
    .responsive-text-lg { font-size: 1.25rem; }
    .responsive-text-xl { font-size: 1.5rem; }
}

@media (min-width: 1024px) {
    .responsive-text-xs { font-size: 1rem; }
    .responsive-text-sm { font-size: 1.125rem; }
    .responsive-text-base { font-size: 1.25rem; }
    .responsive-text-lg { font-size: 1.5rem; }
    .responsive-text-xl { font-size: 1.875rem; }
}

/* Mobile navigation improvements */
@media (max-width: 1023px) {
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 40;
    }
    
    .mobile-menu {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }
    
    .mobile-menu.open {
        transform: translateX(0);
    }
}

/* Touch-friendly button sizes */
@media (max-width: 767px) {
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    /* Larger tap targets for mobile */
    a, button, input, select, textarea {
        min-height: 44px;
    }
}

/* Responsive spacing utilities */
.section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (min-width: 640px) {
    .section-padding {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Responsive card layouts */
.card-responsive {
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .card-responsive {
        margin-bottom: 2rem;
    }
}

/* Mobile-optimized forms */
@media (max-width: 767px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 16px;
    }
}

/* Responsive image containers */
.responsive-image-container {
    position: relative;
    overflow: hidden;
}

.responsive-image-container img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Mobile-first grid improvements */
@media (max-width: 639px) {
    .grid-cols-1 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .gap-8 {
        gap: 1.5rem;
    }
    
    .gap-6 {
        gap: 1rem;
    }
}

/* Landscape phone orientation */
@media (max-width: 896px) and (orientation: landscape) {
    .section-padding {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .hero-section {
        min-height: 70vh;
    }
}

/* Tablet-specific optimizations */
@media (min-width: 768px) and (max-width: 1023px) {
    .container-custom {
        max-width: 100%;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Large screen optimizations */
@media (min-width: 1440px) {
    .container-custom {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Ultra-wide screen support */
@media (min-width: 1920px) {
    .container-custom {
        max-width: 1600px;
    }
}

/* High DPI display support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .high-dpi-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark mode support (if needed) */
@media (prefers-color-scheme: dark) {
    .dark-mode-support {
        background-color: #1a1a1a;
        color: #ffffff;
    }
}

/* Responsive video containers */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-responsive iframe,
.video-responsive object,
.video-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Mobile table responsiveness */
@media (max-width: 767px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-responsive table {
        min-width: 600px;
    }
}
