/* SelfTrainer OS Custom Styles & PWA App Polish */

#fitTrackAppWrapper {
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    line-height: 1.5;
    font-size: 16px;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

#fitTrackAppWrapper * {
    box-sizing: border-box;
}

.ft-emerald-glow {
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.25);
}

.ft-orange-glow {
    box-shadow: 0 4px 14px 0 rgba(249, 115, 22, 0.25);
}

.ft-custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.ft-custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.ft-custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.ft-custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modal Reliability: Always works regardless of Tailwind order */
.st-modal {
    display: none;
}

.st-modal.is-open {
    display: flex !important;
}

/* Smart Workout & General Selection Button Active States */
.smart-select-btn {
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
}

.smart-select-btn.is-active {
    border-color: #10b981 !important;
    background-color: #ecfdf5 !important;
    color: #065f46 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.28) !important;
    font-weight: 800 !important;
}

.smart-select-btn.is-inactive {
    border-color: #e2e8f0 !important;
    background-color: #f8fafc !important;
    color: #334155 !important;
    font-weight: 600 !important;
}

.smart-select-btn.is-inactive:hover {
    border-color: #94a3b8 !important;
    background-color: #f1f5f9 !important;
}

/* Card highlight animation when viewed from exercise list */
.st-highlight-card {
    animation: stCardPulse 1.2s ease;
}

@keyframes stCardPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    50% { transform: scale(1.01); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.25); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Standalone / PWA Mobile App Support */
@media all and (display-mode: standalone) {
    body {
        user-select: none;
        -webkit-user-select: none;
    }
    input, select, textarea {
        user-select: auto;
        -webkit-user-select: auto;
    }
}

/* Print View for Grocery List */
@media print {
    body * {
        visibility: hidden !important;
    }
    #printableGroceryList, #printableGroceryList * {
        visibility: visible !important;
    }
    #printableGroceryList {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        padding: 20px;
    }
}
