/* Custom styles for the workout tracker */

/* Hide number input spinners */
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;
}

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

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

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

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

/* Improved touch targets for mobile */
.touch-target {
    min-height: 44px;
    min-width: 44px;
}

/* Exercise type badges */
.exercise-type-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
}

.type-sm {
    background-color: #fef3c7;
    color: #92400e;
}

.type-c {
    background-color: #dbeafe;
    color: #1e40af;
}

.type-m {
    background-color: #f3e8ff;
    color: #7c3aed;
}

.type-w {
    background-color: #dcfce7;
    color: #166534;
}

/* Animation for notifications - properly hide by default */
#notification {
    transform: translateX(calc(100% + 50px)) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
}

.notification-show {
    transform: translateX(-10px) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Improved focus states for accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Better button hover states */
.btn-hover-scale:hover {
    transform: scale(1.02);
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
}

/* Set input styling */
.set-input {
    width: 60px;
    text-align: center;
}

/* Plus/minus buttons */
.increment-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 0.375rem;
    transition: all 0.15s ease;
}

.increment-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.increment-btn:active {
    background: #f3f4f6;
    transform: scale(0.95);
}

/* Session exercise styling */
.session-exercise {
    border-left: 4px solid #e5e7eb;
    transition: border-color 0.2s ease;
}

.session-exercise:hover {
    border-left-color: #3b82f6;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .set-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .set-input-group {
        width: 100%;
    }
}

/* Progress table styling */
.progress-table {
    font-size: 0.875rem;
}

.progress-table th,
.progress-table td {
    white-space: nowrap;
}

.progress-table tr:nth-child(even) {
    background-color: #f9fafb;
}

.progress-table tr:hover {
    background-color: #f3f4f6;
}

/* Summary stats styling */
.summary-stat {
    padding: 1rem;
    text-align: center;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
}

.summary-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1.2;
}

.summary-stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Fix dropdown lag and improve responsiveness */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1.3em;
    padding-right: 2.5rem;
    cursor: pointer;
    
    /* Fix mobile dropdown lag */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    /* Improve touch responsiveness */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    
    /* Remove focus delay on mobile */
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
}

/* Mobile-specific dropdown fixes */
@media (hover: none) and (pointer: coarse) {
    select {
        -webkit-appearance: menulist;
        -moz-appearance: menulist;
        appearance: menulist;
        background-image: none;
        padding-right: 1rem;
    }
}

select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Smooth transitions for collapsible elements */
.transition-transform {
    transition: transform 0.2s ease-in-out;
}

.fa-chevron-right,
.fa-chevron-down {
    transition: transform 0.2s ease;
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}
