/* Custom CSS for OneMiracles App */

/* Smooth animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: #22c55e;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #16a34a;
}

/* App container */
#app {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Map styling */
#map {
    background: linear-gradient(135deg, #86efac 0%, #22c55e 100%);
    position: relative;
}

#map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

/* Button hover effects */
.service-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.service-button:active {
    transform: translateY(0);
}

/* Balance card gradient animation */
.balance-card {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Card shadows */
.card-shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Search input focus effect */
#search-input:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

/* Menu button press effect */
.menu-button:active {
    transform: scale(0.95);
}

/* Bottom navigation highlight */
.nav-active {
    color: #22c55e !important;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #22c55e;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Nearby place cards */
.nearby-card {
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.nearby-card:hover {
    border-color: #22c55e;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.1);
    transform: translateY(-1px);
}

/* News card styling */
.news-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-left: 4px solid #22c55e;
}

/* Modal animations */
.modal-enter {
    animation: fadeIn 0.3s ease-out;
}

.modal-content-enter {
    animation: slideUp 0.3s ease-out;
}

/* Custom badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Status indicators */
.status-online {
    background-color: #10b981;
}

.status-busy {
    background-color: #f59e0b;
}

.status-offline {
    background-color: #6b7280;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
    transition: all 0.3s ease;
    z-index: 40;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.6);
}

/* Glass morphism effect */
.glass {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Pulse animation for active elements */
.pulse-active {
    animation: pulse 2s infinite;
}

/* Custom checkbox */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-checkbox:checked {
    background-color: #22c55e;
    border-color: #22c55e;
}

.custom-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Notification dot */
.notification-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 2px solid white;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Mobile optimizations */
@media (max-width: 480px) {
    .text-responsive {
        font-size: 0.875rem;
    }
    
    .grid-responsive {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .padding-responsive {
        padding: 0.75rem;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark-support {
        background-color: #1f2937;
        color: #f9fafb;
    }
}

/* Touch feedback */
.touch-feedback:active {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(0.98);
}

/* Smooth transitions for all interactive elements */
button, input, select, textarea, a {
    transition: all 0.2s ease;
}

/* Focus indicators for accessibility */
button:focus, input:focus, select:focus, textarea:focus, a:focus {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Hide focus outline for mouse users */
.js-focus-visible button:focus:not(.focus-visible),
.js-focus-visible input:focus:not(.focus-visible),
.js-focus-visible select:focus:not(.focus-visible),
.js-focus-visible textarea:focus:not(.focus-visible),
.js-focus-visible a:focus:not(.focus-visible) {
    outline: none;
}
