/* Custom styles for Mmm Food app */

/* Touch-friendly button sizing */
.macro-button {
    min-height: 48px;
    min-width: 48px;
    touch-action: manipulation;
}

/* Smooth transitions */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from, .fade-leave-to {
    opacity: 0;
}

/* Large touch targets for mobile */
@media (max-width: 640px) {
    .macro-counter button {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .macro-counter .count-display {
        font-size: 2rem;
        min-width: 3rem;
    }
}

/* Focus styles for accessibility */
button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom scrollbar for mobile */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Prevent zoom on input focus (iOS) */
input[type="number"] {
    font-size: 16px;
}

/* Custom number input styling */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Loading spinner (for future PocketBase integration) */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-left: 10px;
}

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

/* Offline indicator */
.offline-indicator {
    background-color: #ef4444;
    color: white;
    padding: 8px;
    text-align: center;
    font-size: 14px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.offline-indicator.show {
    transform: translateY(0);
}