/* Shared admin UI: service cards + reliable mobile top nav (loads after page inline CSS) */

/* ----- Service cards (dashboard preview + manage services page) ----- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: var(--spacing-lg, 1.5rem);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.service-card {
    background: white;
    border-radius: var(--radius-xl, 0.75rem);
    overflow: hidden;
    box-shadow: var(--shadow-md, 0 4px 6px -1px rgb(0 0 0 / 0.1));
    border: 1px solid var(--gray-200, #e5e7eb);
    min-width: 0;
    max-width: 100%;
}

.service-card .service-image {
    height: 160px;
    position: relative;
    background: var(--gray-100, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.service-card .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card .service-image > i {
    font-size: 3rem;
    color: var(--gray-400, #9ca3af);
}

.service-card .service-status {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.service-card .service-status.active {
    background: #d1fae5;
    color: #065f46;
}

.service-card .service-status.inactive {
    background: #fee2e2;
    color: #991b1b;
}

.service-card .service-content {
    padding: var(--spacing-lg, 1.5rem);
}

.service-card .service-content h4,
.service-card .service-header h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    color: var(--gray-900, #111827);
    overflow-wrap: anywhere;
}

.service-card .service-category {
    display: inline-block;
    background: var(--primary-50, #eff6ff);
    color: var(--primary-700, #1d4ed8);
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.service-card .service-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-600, #2563eb);
}

.service-card .service-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.service-card .service-actions button {
    flex: 1 1 auto;
    min-width: 0;
}

/* Expo WebView: hamburger + dropdown (media queries often do not apply) */
html.ap-expo-app .navbar .mobile-menu-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    min-height: 44px !important;
    margin-left: auto !important;
    z-index: 1102 !important;
    pointer-events: auto !important;
}

html.ap-expo-app .navbar .nav-content > .nav-links:not(.show) {
    display: none !important;
}

html.ap-expo-app .navbar .nav-content > .nav-links.show {
    display: flex !important;
    flex-direction: column !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: #fff !important;
    z-index: 1101 !important;
    padding: 1rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* ----- Mobile top navigation (hamburger) ----- */
@media (max-width: 768px) {
    .navbar {
        z-index: 1100 !important;
    }

    .navbar .container,
    .navbar .nav-content {
        position: relative !important;
        min-width: 0;
    }

    .navbar .nav-content > .nav-links:not(.show) {
        display: none !important;
    }

    .navbar .nav-content > .nav-links.show {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: min(72vh, 520px) !important;
        overflow-y: auto !important;
        background: #fff !important;
        padding: 1rem !important;
        box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1) !important;
        border-top: 1px solid var(--gray-200, #e5e7eb) !important;
        z-index: 1101 !important;
    }

    .navbar .nav-content > .nav-links.show a,
    .navbar .nav-content > .nav-links.show button {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        min-height: 44px !important;
    }

    .navbar .mobile-menu-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 44px !important;
        min-height: 44px !important;
        z-index: 1102 !important;
        position: relative !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent;
    }

    .services-grid {
        grid-template-columns: 1fr !important;
    }
}
