/* SaaS Design Alchemy - Custom Styles */

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -20px, 0);
    }
    70% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Scroll animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Custom gradients */
.gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #8b5cf6 0%, #5b21b6 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.gradient-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gradient-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Glass morphism effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Focus styles */
.focus-primary:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    ring-offset: 2px;
}

/* Button styles */
.btn {
    @apply px-4 py-2 rounded-lg font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2;
}

.btn-primary {
    @apply bg-blue-500 hover:bg-blue-700 text-white focus:ring-blue-500;
}

.btn-secondary {
    @apply bg-gray-500 hover:bg-gray-700 text-white focus:ring-gray-500;
}

.btn-success {
    @apply bg-green-500 hover:bg-green-700 text-white focus:ring-green-500;
}

.btn-warning {
    @apply bg-yellow-500 hover:bg-yellow-700 text-black focus:ring-yellow-500;
}

.btn-error {
    @apply bg-red-500 hover:bg-red-700 text-white focus:ring-red-500;
}

.btn-outline {
    @apply border-2 bg-transparent hover:bg-opacity-10;
}

.btn-lg {
    @apply px-6 py-3 text-lg;
}

.btn-sm {
    @apply px-3 py-1 text-sm;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

/* Card styles */
.card {
    @apply bg-white rounded-lg shadow-sm border border-gray-200 p-6;
}

.card-hover {
    @apply hover:shadow-lg transition-shadow duration-200;
}

.card-header {
    @apply border-b border-gray-200 pb-4 mb-4;
}

.card-footer {
    @apply border-t border-gray-200 pt-4 mt-4;
}

/* Form styles */
.form-input {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-textarea {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent resize-vertical;
}

.form-select {
    @apply w-full px-3 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent;
}

.form-checkbox {
    @apply rounded text-blue-500 focus:ring-blue-500;
}

.form-radio {
    @apply text-blue-500 focus:ring-blue-500;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-1;
}

.form-error {
    @apply text-red-500 text-sm mt-1;
}

.form-help {
    @apply text-gray-500 text-sm mt-1;
}

/* Alert styles */
.alert {
    @apply p-4 rounded-lg border;
}

.alert-info {
    @apply bg-blue-50 border-blue-200 text-blue-800;
}

.alert-success {
    @apply bg-green-50 border-green-200 text-green-800;
}

.alert-warning {
    @apply bg-yellow-50 border-yellow-200 text-yellow-800;
}

.alert-error {
    @apply bg-red-50 border-red-200 text-red-800;
}

/* Badge styles */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-primary {
    @apply bg-blue-100 text-blue-800;
}

.badge-secondary {
    @apply bg-gray-100 text-gray-800;
}

.badge-success {
    @apply bg-green-100 text-green-800;
}

.badge-warning {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-error {
    @apply bg-red-100 text-red-800;
}

/* Navigation styles */
.nav-scrolled {
    @apply bg-white bg-opacity-95 backdrop-blur-sm shadow-lg;
}

/* Dropdown styles */
.dropdown-content {
    @apply opacity-0 invisible transform scale-95 transition-all duration-200 ease-out;
}

.dropdown:hover .dropdown-content,
.dropdown-content:not(.hidden) {
    @apply opacity-100 visible transform scale-100;
}

/* Tooltip styles */
.tooltip-top::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.tooltip-bottom::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #1f2937 transparent;
}

.tooltip-left::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent #1f2937;
}

.tooltip-right::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent #1f2937 transparent transparent;
}

/* Modal styles */
.modal-backdrop {
    @apply fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50;
}

.modal-content {
    @apply bg-white rounded-lg shadow-xl max-w-md w-full max-h-full overflow-y-auto;
}

/* Code block styles */
.code-block {
    @apply bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto;
}

.code-inline {
    @apply bg-gray-100 text-gray-800 px-1 py-0.5 rounded text-sm;
}

/* Table styles */
.table {
    @apply w-full text-sm text-left text-gray-500;
}

.table-header {
    @apply text-xs text-gray-700 uppercase bg-gray-50;
}

.table-row {
    @apply bg-white border-b hover:bg-gray-50;
}

.table-cell {
    @apply px-6 py-4;
}

/* Utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.backdrop-blur-xs {
    backdrop-filter: blur(2px);
}

/* Responsive typography */
.text-responsive {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.text-responsive-lg {
    font-size: clamp(1.5rem, 4vw, 3rem);
}

.text-responsive-xl {
    font-size: clamp(2rem, 6vw, 4rem);
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-mode {
        @apply bg-gray-900 text-white;
    }
    
    .dark-mode .card {
        @apply bg-gray-800 border-gray-700;
    }
    
    .dark-mode .form-input {
        @apply bg-gray-800 border-gray-700 text-white;
    }
    
    .dark-mode .nav-scrolled {
        @apply bg-gray-900 bg-opacity-95;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible for better keyboard navigation */
.focus-visible:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
} 