/* Freezer Tracker - Mobile-First Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --navbar-height: 56px;
    --bottom-nav-height: 64px;
}

/* Base Styles */
html {
    font-size: 16px;
}

body {
    padding-top: var(--navbar-height);
    padding-bottom: calc(var(--bottom-nav-height) + 16px);
    background-color: #f8f9fa;
    -webkit-tap-highlight-color: transparent;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 16px;
    }
}

/* Main Content */
.main-content {
    min-height: calc(100vh - var(--navbar-height) - var(--bottom-nav-height));
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.75rem;
    padding: 8px 12px;
    min-width: 64px;
    transition: color 0.2s;
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--primary-color);
}

.bottom-nav-item.add-btn {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    margin-top: -20px;
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.3);
}

.bottom-nav-item.add-btn:hover {
    color: white;
    background: #0b5ed7;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 12px;
}

.stat-card {
    border-radius: 12px;
}

.stat-card .card-body {
    padding: 1rem;
}

/* Item Cards */
.item-card {
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.item-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.item-card.item-used {
    opacity: 0.7;
}

.item-image {
    height: 140px;
    object-fit: cover;
}

.item-image-placeholder {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #adb5bd;
}

.item-image-placeholder i {
    font-size: 2rem;
}

/* Thumbnails */
.item-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.item-thumbnail-lg {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.item-thumbnail-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 8px;
    color: #adb5bd;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(13, 110, 253, 0.05);
}

/* Category Badge */
.category-badge {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #212529;
    transition: background-color 0.2s;
}

.category-badge:hover {
    background: #e9ecef;
    color: #212529;
}

/* Info Items */
.info-item {
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Recipe Content */
.recipe-content {
    line-height: 1.6;
}

.recipe-content h1,
.recipe-content h2,
.recipe-content h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.recipe-content ul,
.recipe-content ol {
    padding-left: 1.5rem;
}

.recipe-content li {
    margin-bottom: 0.25rem;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    min-height: 48px;
}

/* Touch-friendly sizes */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .list-group-item {
        padding: 1rem;
    }
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
}

/* List Group */
.list-group-item {
    border-left: none;
    border-right: none;
}

.list-group-item:first-child {
    border-top: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.list-group-item:last-child {
    border-bottom: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Navbar */
.navbar-brand {
    font-weight: 600;
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    
    .main-content {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* Print Styles */
@media print {
    .bottom-nav,
    .navbar,
    .btn {
        display: none !important;
    }
    
    body {
        padding: 0;
    }
}
