/* Kolam Monitor - Custom Styles */

:root {
    --primary: #0d6efd;
    --bottom-nav-height: 60px;
}

body {
    background-color: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding-bottom: var(--bottom-nav-height);
}

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

/* Cards */
.card {
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* Pond cards */
.pond-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pond-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1) !important;
}

/* Bottom navigation */
.bottom-nav {
    height: var(--bottom-nav-height);
    z-index: 1030;
}

.bottom-nav .nav-link {
    font-size: 0.7rem;
    padding: 0.4rem 0.5rem;
    text-decoration: none;
}

.bottom-nav .nav-link i {
    margin-bottom: 2px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
}

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

.btn {
    border-radius: 8px;
}

/* Tabs */
.nav-tabs .nav-link {
    border-radius: 8px 8px 0 0;
    font-size: 0.9rem;
    color: #6c757d;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
    color: var(--primary);
}

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

/* List group */
.list-group-item-action:hover {
    background-color: #f8f9fa;
}

/* Alert */
.alert {
    border-radius: 10px;
    border: none;
}

/* Table */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
}

/* PWA Install prompt style */
.pwa-install-banner {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 10px);
    left: 10px;
    right: 10px;
    z-index: 1040;
    display: none;
}

@media (min-width: 992px) {
    .pwa-install-banner {
        bottom: 20px;
        left: auto;
        right: 20px;
        max-width: 360px;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .bottom-nav {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
        height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }
    
    body {
        padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    }
    
    @media (min-width: 992px) {
        body {
            padding-bottom: 0;
        }
    }
}

/* Chart container */
canvas {
    max-height: 250px;
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
