/* Chrome Mobile Browser Specific Fixes */

/* Prevent Chrome mobile from auto-zooming on input focus */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select, textarea, input[type="text"], input[type="password"], 
    input[type="datetime"], input[type="datetime-local"], 
    input[type="date"], input[type="month"], input[type="time"], 
    input[type="week"], input[type="number"], input[type="email"], 
    input[type="url"], input[type="search"], input[type="tel"], 
    input[type="color"] {
        font-size: 16px !important;
        transform: translateZ(0);
        -webkit-appearance: none;
        border-radius: 0;
    }
}

/* Chrome mobile viewport fix */
@supports (-webkit-touch-callout: none) {
    html {
        height: -webkit-fill-available;
    }
    
    body {
        min-height: -webkit-fill-available;
    }
}

/* Chrome mobile safe area handling */
@supports (padding: max(0px)) {
    body {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
}

/* Chrome mobile scroll behavior */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Chrome mobile touch improvements */
* {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for inputs and content areas */
input, textarea, [contenteditable="true"], .editor, .note-title, .task-text {
    -webkit-user-select: text !important;
    -khtml-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Chrome mobile button improvements */
button, .tool-btn, .add-btn, .add-schedule-btn, .add-task {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: 0;
    touch-action: manipulation;
}

/* Chrome mobile flexbox fixes */
.container, .main-content, .sidebar {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}

/* Chrome mobile grid fixes */
.days-grid, .months-grid {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Chrome mobile animation performance */
.sticky-note, .day-card, .month-card, .note-item {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Chrome mobile keyboard handling */
@media screen and (max-height: 500px) {
    .sidebar {
        max-height: 120px !important;
    }
    
    .sticky-note {
        min-height: 280px !important;
    }
    
    .day-card, .month-card {
        min-height: 200px !important;
    }
}

/* Chrome mobile orientation fixes */
@media screen and (orientation: landscape) and (max-height: 500px) {
    body {
        padding: 5px !important;
    }
    
    .container {
        gap: 10px !important;
    }
    
    .sticky-note {
        min-height: 250px !important;
    }
}