/* Custom CSS styles */

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Form Styles */
.form-input {
    @apply w-full px-4 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500;
}

.form-label {
    @apply block text-sm font-medium text-gray-700 mb-1;
}

.form-error {
    @apply text-red-600 text-sm mt-1;
}

.form-success {
    @apply text-green-600 text-sm mt-1;
}

.btn {
    @apply inline-flex items-center justify-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2;
}

.btn-primary {
    @apply bg-primary-600 text-white hover:bg-primary-700 focus:ring-primary-500;
}

.btn-secondary {
    @apply bg-secondary-600 text-white hover:bg-secondary-700 focus:ring-secondary-500;
}

.btn-white {
    @apply bg-white text-gray-700 border-gray-300 hover:bg-gray-50 focus:ring-primary-500;
}

.btn-danger {
    @apply bg-red-600 text-white hover:bg-red-700 focus:ring-red-500;
}

.btn-sm {
    @apply px-3 py-1.5 text-xs;
}

.btn-lg {
    @apply px-6 py-3 text-base;
}

/* Card Styles */
.card {
    @apply bg-white rounded-lg shadow-md overflow-hidden;
}

.card-header {
    @apply px-6 py-4 bg-gray-50 border-b border-gray-200;
}

.card-body {
    @apply px-6 py-4;
}

.card-footer {
    @apply px-6 py-4 bg-gray-50 border-t border-gray-200;
}

/* Table Styles */
.table {
    @apply min-w-full divide-y divide-gray-200;
}

.table th {
    @apply px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider;
}

.table td {
    @apply px-6 py-4 whitespace-nowrap;
}

.table tr {
    @apply bg-white;
}

.table tr:nth-child(even) {
    @apply bg-gray-50;
}

/* Badge Styles */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

.badge-green {
    @apply bg-green-100 text-green-800;
}

.badge-red {
    @apply bg-red-100 text-red-800;
}

.badge-yellow {
    @apply bg-yellow-100 text-yellow-800;
}

.badge-blue {
    @apply bg-blue-100 text-blue-800;
}

.badge-gray {
    @apply bg-gray-100 text-gray-800;
}

/* Alert Styles */
.alert {
    @apply p-4 rounded-md mb-4;
}

.alert-success {
    @apply bg-green-100 border border-green-400 text-green-700;
}

.alert-error {
    @apply bg-red-100 border border-red-400 text-red-700;
}

.alert-warning {
    @apply bg-yellow-100 border border-yellow-400 text-yellow-700;
}

.alert-info {
    @apply bg-blue-100 border border-blue-400 text-blue-700;
}

/* Custom Components */
.hero-section {
    @apply relative bg-gradient-to-r from-primary-600 to-primary-800 text-white py-16 md:py-24;
}

.feature-card {
    @apply flex flex-col items-center text-center p-6 bg-white rounded-lg shadow-md transition-transform hover:transform hover:scale-105;
}

.testimonial-card {
    @apply bg-white p-6 rounded-lg shadow-md border border-gray-100;
}

.meal-card {
    @apply bg-white rounded-lg shadow-md overflow-hidden transition-transform hover:transform hover:scale-105;
}

.meal-card-image {
    @apply w-full h-48 object-cover;
}

.meal-card-content {
    @apply p-4;
}

.stat-card {
    @apply bg-white p-6 rounded-lg shadow-md text-center;
}

.stat-value {
    @apply text-3xl font-bold text-primary-600 mb-2;
}

.stat-label {
    @apply text-sm text-gray-500;
}

/* Dashboard Components */
.sidebar {
    @apply bg-gray-800 text-white w-64 fixed h-full overflow-y-auto;
}

.sidebar-link {
    @apply flex items-center px-4 py-3 text-gray-300 hover:bg-gray-700 hover:text-white transition-colors;
}

.sidebar-link.active {
    @apply bg-gray-700 text-white;
}

.content-area {
    @apply ml-64 p-6;
}

.dashboard-card {
    @apply bg-white rounded-lg shadow-md p-6;
}

/* Progress Bar */
.progress-bar {
    @apply w-full bg-gray-200 rounded-full h-2.5;
}

.progress-bar-fill {
    @apply bg-primary-600 h-2.5 rounded-full;
}

/* Custom Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInFromBottom {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .content-area {
        @apply ml-0;
    }
    
    .sidebar {
        @apply transform -translate-x-full;
    }
    
    .sidebar.open {
        @apply transform translate-x-0;
    }
}

/* RTL Support */
[dir="rtl"] .sidebar {
    @apply right-0;
}

[dir="rtl"] .content-area {
    @apply mr-64 ml-0;
}

@media (max-width: 768px) {
    [dir="rtl"] .content-area {
        @apply mr-0;
    }
    
    [dir="rtl"] .sidebar {
        @apply transform translate-x-full;
    }
    
    [dir="rtl"] .sidebar.open {
        @apply transform translate-x-0;
    }
}
