/* Tailwind CSS Custom Styles for Contact North AI Modules */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

/* Custom CSS Variables for consistent theming */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #64748b;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
}

/* Mobile-first responsive design */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
}

/* Base styles */
body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--gray-800);
    background: #ffffff;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-size: 16px;
}

/* Improved typography for better readability */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

h1 {
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--gray-700);
}

/* Improved readability for content areas */
.content-area {
    font-size: 1.1rem;
    line-height: 1.8;
}

.content-area p {
    margin-bottom: 1.5rem;
}

.content-area ul, .content-area ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-area li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

/* Better spacing for cards and sections */
.card-content {
    padding: 2rem;
}

.card-content h3 {
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.card-content p {
    margin-bottom: 1.25rem;
    color: var(--gray-600);
}

/* Improved form styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: white;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Better button styling */
.btn-primary {
    background-color: var(--accent);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Improved list styling */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: var(--gray-50);
    border-radius: 0.5rem;
    border-left: 4px solid var(--accent);
}

.feature-list li:last-child {
    margin-bottom: 0;
}

/* Better spacing for sections */
.section-spacing {
    margin-bottom: 3rem;
}

.section-spacing:last-child {
    margin-bottom: 0;
}

/* Improved mobile readability */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .content-area {
        font-size: 1rem;
    }
    
    .card-content {
        padding: 1.5rem;
    }
}

/* iOS and Android specific optimizations */
@supports (-webkit-touch-callout: none) {
    /* iOS specific styles */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    input, textarea, select {
        -webkit-appearance: none;
        border-radius: 0;
    }
    
    /* Prevent zoom on input focus on iOS */
    input[type="text"], input[type="email"], input[type="password"], 
    textarea, select {
        font-size: 16px;
    }
}

/* Android specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select {
        background-image: none;
    }
}

/* Touch-friendly button sizes */
button, .btn, input[type="button"], input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

/* Improved mobile navigation */
@media (max-width: 768px) {
    .nav-mobile-menu {
        position: fixed;
        top: 4rem;
        left: -100%;
        width: 100%;
        height: calc(100vh - 4rem);
        background: var(--gray-800);
        transition: left 0.3s ease;
        z-index: 50;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-mobile-menu.active {
        left: 0;
    }
    
    /* Mobile-friendly spacing */
    .container, .max-w-7xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile typography */
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    /* Mobile form improvements */
    input, textarea, select {
        font-size: 16px;
        padding: 12px 16px;
        border-radius: 8px;
        border: 2px solid var(--gray-300);
        width: 100%;
        transition: border-color 0.2s ease;
    }
    
    input:focus, textarea:focus, select:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    /* Mobile card improvements */
    .card-hover {
        margin-bottom: 1rem;
        border-radius: 12px;
        overflow: hidden;
    }
    
    /* Mobile button improvements */
    .btn {
        padding: 12px 24px;
        font-size: 16px;
        border-radius: 8px;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile grid improvements */
    .grid {
        gap: 1rem;
    }
    
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    /* Mobile table improvements */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: 14px;
    }
    
    th, td {
        padding: 8px 12px;
        white-space: nowrap;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .container, .max-w-7xl {
        padding-left: 2rem;
        padding-right: 2rem;
    }
    
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large mobile devices (iPhone Plus, etc.) */
@media (min-width: 414px) and (max-width: 768px) {
    .container, .max-w-7xl {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Small mobile devices */
@media (max-width: 413px) {
    .container, .max-w-7xl {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Landscape mobile optimizations */
@media (max-height: 500px) and (orientation: landscape) {
    .nav-mobile-menu {
        height: calc(100vh - 3rem);
        top: 3rem;
    }
    
    .py-8 {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
    
    .py-16 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .shadow-soft {
        box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #0f172a;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-300: #475569;
        --gray-400: #64748b;
        --gray-500: #94a3b8;
        --gray-600: #cbd5e1;
        --gray-700: #e2e8f0;
        --gray-800: #f1f5f9;
        --gray-900: #f8fafc;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-fade-in-up {
        animation: none;
    }
    
    .card-hover:hover {
        transform: none;
    }
    
    .btn-hover-lift:hover {
        transform: none;
    }
}

/* Custom component styles that complement Tailwind */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-soft-lg {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Mobile navigation improvements - moved to main mobile section above */

/* Form enhancements */
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-checkbox:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-radio:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* Button hover effects */
.btn-hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Card hover effects */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

/* Status indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-completed {
    background-color: var(--success);
}

.status-in-progress {
    background-color: var(--warning);
}

.status-not-started {
    background-color: var(--gray-400);
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent) 0%, var(--accent-light) 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.notification-success {
    background-color: var(--success);
}

.notification-error {
    background-color: var(--danger);
}

.notification-info {
    background-color: var(--info);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-before: always;
    }
}
