@lethevimlet/sshift 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -221,9 +221,25 @@ html, body {
221
221
  }
222
222
 
223
223
  /* Fix for mobile viewport height issues */
224
- /* Use svh (small viewport height) with fallbacks for mobile browsers */
225
- /* svh accounts for browser UI (address bar, navigation bar) and prevents overflow */
226
- @supports (height: 100svh) {
224
+ /* Use dvh (dynamic viewport height) with fallbacks for mobile browsers */
225
+ /* dvh accounts for browser UI (address bar, navigation bar) and keyboard, automatically adjusting */
226
+ @supports (height: 100dvh) {
227
+ html, body {
228
+ height: 100dvh;
229
+ }
230
+
231
+ .app-container {
232
+ height: 100dvh;
233
+ }
234
+
235
+ .modal {
236
+ height: 100dvh;
237
+ max-height: 100dvh;
238
+ }
239
+ }
240
+
241
+ /* Fallback to svh (small viewport height) for browsers without dvh support */
242
+ @supports (height: 100svh) and (not (height: 100dvh)) {
227
243
  html, body {
228
244
  height: 100svh;
229
245
  }
@@ -238,7 +254,7 @@ html, body {
238
254
  }
239
255
  }
240
256
 
241
- /* Fallback for browsers without svh support - uses JS-set --vh variable */
257
+ /* Final fallback for browsers without svh/dvh support - uses JS-set --vh variable */
242
258
  @supports not (height: 100svh) {
243
259
  html, body {
244
260
  height: calc(var(--vh, 1vh) * 100);
@@ -1495,6 +1511,67 @@ body {
1495
1511
  color: var(--accent-primary);
1496
1512
  }
1497
1513
 
1514
+ /* Terminal Context Menu */
1515
+ .terminal-context-menu {
1516
+ position: fixed;
1517
+ background: var(--bg-secondary);
1518
+ border: 1px solid var(--border-color);
1519
+ border-radius: var(--radius-md);
1520
+ box-shadow: var(--shadow-lg);
1521
+ z-index: 1000;
1522
+ min-width: 140px;
1523
+ padding: 4px 0;
1524
+ display: none;
1525
+ }
1526
+
1527
+ .terminal-context-menu.active {
1528
+ display: block;
1529
+ }
1530
+
1531
+ .terminal-context-menu-item {
1532
+ display: flex;
1533
+ align-items: center;
1534
+ gap: 10px;
1535
+ padding: 8px 12px;
1536
+ cursor: pointer;
1537
+ transition: var(--transition-fast);
1538
+ color: var(--text-primary);
1539
+ font-size: 13px;
1540
+ }
1541
+
1542
+ .terminal-context-menu-item:hover {
1543
+ background: var(--bg-hover);
1544
+ }
1545
+
1546
+ .terminal-context-menu-item i {
1547
+ width: 16px;
1548
+ text-align: center;
1549
+ color: var(--text-secondary);
1550
+ }
1551
+
1552
+ .terminal-context-menu-item:hover i {
1553
+ color: var(--accent-primary);
1554
+ }
1555
+
1556
+ .terminal-context-menu-item.disabled {
1557
+ opacity: 0.5;
1558
+ cursor: not-allowed;
1559
+ }
1560
+
1561
+ .terminal-context-menu-item.disabled:hover {
1562
+ background: transparent;
1563
+ }
1564
+
1565
+ .terminal-context-menu-item.disabled:hover i {
1566
+ color: var(--text-secondary);
1567
+ }
1568
+
1569
+ .terminal-context-menu-divider {
1570
+ height: 1px;
1571
+ background: var(--border-color);
1572
+ margin: 4px 0;
1573
+ }
1574
+
1498
1575
  /* Tab Rename Input */
1499
1576
  .tab-rename-input {
1500
1577
  background: var(--bg-tertiary);
@@ -3336,50 +3413,34 @@ body.dragging-tabs .tabs-container {
3336
3413
 
3337
3414
  .app-container {
3338
3415
  overflow: hidden !important;
3339
- max-height: 100vh;
3340
- max-height: 100svh;
3341
3416
  overscroll-behavior: none;
3417
+ /* Use dvh for dynamic viewport height that accounts for keyboard */
3418
+ height: 100dvh;
3419
+ height: 100svh;
3420
+ height: calc(var(--vh, 1vh) * 100);
3342
3421
  }
3343
3422
 
3423
+ /* Main content should use flexbox to fill available space */
3344
3424
  .main-content {
3345
3425
  overflow: hidden !important;
3346
- /* Account for mobile-keys-bar (75px) at bottom */
3347
- /* Header (43px + 1px border) and tabs (35px + 1px border) are handled by padding-top */
3348
- max-height: calc(100vh - 75px);
3349
- max-height: calc(100svh - 75px);
3350
3426
  overscroll-behavior: none;
3427
+ /* Use flex to fill available space */
3428
+ flex: 1;
3429
+ display: flex;
3430
+ flex-direction: column;
3431
+ min-height: 0; /* Allow flexbox to shrink */
3432
+ /* Remove fixed max-height - let flexbox handle it */
3351
3433
  }
3352
3434
 
3353
- /* When mobile keys bar is hidden (e.g., for SFTP tabs), use full height */
3354
- body.mobile-keys-bar-hidden .main-content {
3355
- max-height: 100vh !important;
3356
- max-height: 100svh !important;
3357
- }
3358
-
3359
- /* Ensure all containers fill the space when mobile keys bar is hidden */
3360
- body.mobile-keys-bar-hidden .terminal-area {
3361
- height: 100% !important;
3362
- max-height: 100% !important;
3363
- }
3364
-
3365
- body.mobile-keys-bar-hidden .terminals-container {
3366
- height: 100% !important;
3367
- max-height: 100% !important;
3368
- }
3369
-
3370
- body.mobile-keys-bar-hidden .terminal-wrapper.active {
3371
- height: 100% !important;
3372
- }
3373
-
3374
- body.mobile-keys-bar-hidden .sftp-container {
3375
- height: 100% !important;
3376
- min-height: 100% !important;
3377
- }
3378
-
3435
+ /* Terminal area should fill all available space in main-content */
3379
3436
  .terminal-area {
3380
3437
  overflow: hidden !important;
3381
- max-height: 100%;
3382
3438
  overscroll-behavior: none;
3439
+ /* Fill available space in flex container */
3440
+ flex: 1;
3441
+ display: flex;
3442
+ flex-direction: column;
3443
+ min-height: 0; /* Allow flexbox to shrink */
3383
3444
  }
3384
3445
 
3385
3446
  /* Mobile header/tabs hide/show on scroll */
@@ -3389,6 +3450,8 @@ body.dragging-tabs .tabs-container {
3389
3450
  left: 0;
3390
3451
  right: 0;
3391
3452
  z-index: 100;
3453
+ /* Don't use flex - fixed positioning */
3454
+ flex: none;
3392
3455
  }
3393
3456
 
3394
3457
  .header.hidden {
@@ -3401,6 +3464,7 @@ body.dragging-tabs .tabs-container {
3401
3464
  left: 0;
3402
3465
  right: 0;
3403
3466
  z-index: 45; /* Lower than sidebar (z-index: 50) so sidebar appears on top */
3467
+ flex: none;
3404
3468
  }
3405
3469
 
3406
3470
  .tabs-container.hidden {
@@ -3411,6 +3475,8 @@ body.dragging-tabs .tabs-container {
3411
3475
  .main-content {
3412
3476
  /* Header: 43px + 1px border, Tabs: 35px + 1px border = 80px total */
3413
3477
  padding-top: 80px;
3478
+ /* Account for mobile keys bar at bottom - use padding-bottom */
3479
+ padding-bottom: 75px;
3414
3480
  }
3415
3481
 
3416
3482
  /* When header is hidden, move tabs to top and adjust padding */
@@ -3427,6 +3493,28 @@ body.dragging-tabs .tabs-container {
3427
3493
  .app-container.header-hidden.tabs-hidden .main-content {
3428
3494
  padding-top: 0;
3429
3495
  }
3496
+
3497
+ /* When mobile keys bar is hidden (e.g., for SFTP tabs), remove bottom padding */
3498
+ body.mobile-keys-bar-hidden .main-content {
3499
+ padding-bottom: 0 !important;
3500
+ }
3501
+
3502
+ /* Ensure all containers fill the space when mobile keys bar is hidden */
3503
+ body.mobile-keys-bar-hidden .terminal-area {
3504
+ flex: 1;
3505
+ }
3506
+
3507
+ body.mobile-keys-bar-hidden .terminals-container {
3508
+ flex: 1;
3509
+ }
3510
+
3511
+ body.mobile-keys-bar-hidden .terminal-wrapper.active {
3512
+ /* Already positioned absolute to fill terminals-container */
3513
+ }
3514
+
3515
+ body.mobile-keys-bar-hidden .sftp-container {
3516
+ flex: 1;
3517
+ }
3430
3518
  }
3431
3519
 
3432
3520
  /* Desktop: Hide mobile keys bar completely */
@@ -3436,6 +3524,71 @@ body.dragging-tabs .tabs-container {
3436
3524
  }
3437
3525
  }
3438
3526
 
3527
+ /* Mobile keyboard visible state - adjust layout when keyboard is open */
3528
+ @media (max-width: 768px) {
3529
+ /* Prevent layout scroll that could push fixed elements out of view */
3530
+ body.keyboard-visible {
3531
+ overflow: hidden !important;
3532
+ }
3533
+
3534
+ body.keyboard-visible .header,
3535
+ body.keyboard-visible .tabs-container {
3536
+ position: fixed !important;
3537
+ left: 0 !important;
3538
+ right: 0 !important;
3539
+ transform: none !important;
3540
+ }
3541
+
3542
+ body.keyboard-visible .header {
3543
+ top: var(--vv-offset-top, 0px) !important;
3544
+ z-index: 100 !important;
3545
+ }
3546
+
3547
+ body.keyboard-visible .tabs-container {
3548
+ top: calc(var(--vv-offset-top, 0px) + var(--header-height, 43px)) !important;
3549
+ z-index: 45 !important;
3550
+ }
3551
+
3552
+ body.keyboard-visible .main-content {
3553
+ /* Header and tabs stay fixed at top when keyboard is open */
3554
+ padding-top: 80px !important;
3555
+ /* Remove bottom padding since mobile keys bar is positioned above keyboard */
3556
+ padding-bottom: 0 !important;
3557
+ }
3558
+
3559
+ /* When keyboard is visible and both header and tabs are hidden (shouldn't happen on keyboard, but keep for safety) */
3560
+ body.keyboard-visible.app-container.header-hidden.tabs-hidden .main-content,
3561
+ body.keyboard-visible .app-container.header-hidden.tabs-hidden .main-content {
3562
+ padding-top: 0 !important;
3563
+ padding-bottom: 0 !important;
3564
+ }
3565
+
3566
+ /* Adjust terminal area when keyboard is visible */
3567
+ body.keyboard-visible .terminal-area {
3568
+ /* Use the visual viewport height, minus header, tabs, and mobile keys bar */
3569
+ height: calc(var(--viewport-height, 100vh) - var(--header-height, 43px) - var(--mobile-keys-bar-height, 75px) - 37px);
3570
+ max-height: calc(var(--viewport-height, 100vh) - var(--header-height, 43px) - var(--mobile-keys-bar-height, 75px) - 37px);
3571
+ }
3572
+
3573
+ /* Remove default spacing on terminal elements when keyboard is visible */
3574
+ body.keyboard-visible .terminal-area *,
3575
+ body.keyboard-visible .terminal-area *::before,
3576
+ body.keyboard-visible .terminal-area *::after {
3577
+ margin-bottom: -0.5px;
3578
+ }
3579
+
3580
+ /* Ensure terminals container fills available space */
3581
+ body.keyboard-visible .terminals-container {
3582
+ flex: 1;
3583
+ min-height: 50px;
3584
+ }
3585
+
3586
+ /* Ensure terminal wrapper fills available space */
3587
+ body.keyboard-visible .terminal-wrapper.active {
3588
+ min-height: 50px;
3589
+ }
3590
+ }
3591
+
3439
3592
  /* Mobile-specific xterm styles to prevent native scroll interference */
3440
3593
  @media (max-width: 768px) {
3441
3594
  .terminal-container {
@@ -3443,11 +3596,18 @@ body.dragging-tabs .tabs-container {
3443
3596
  overscroll-behavior: none;
3444
3597
  touch-action: pan-y; /* Allow vertical scrolling */
3445
3598
  -webkit-overflow-scrolling: touch;
3599
+ /* Fill available space in flex container */
3600
+ flex: 1;
3601
+ min-height: 100px; /* Ensure minimum height for initialization */
3446
3602
  }
3447
3603
 
3448
3604
  .terminal-container .xterm {
3449
3605
  overflow: hidden !important;
3450
3606
  touch-action: pan-y; /* Allow vertical scrolling */
3607
+ /* Fill available space */
3608
+ height: 100%;
3609
+ display: flex;
3610
+ flex-direction: column;
3451
3611
  }
3452
3612
 
3453
3613
  .terminal-container .xterm-viewport {
@@ -3456,6 +3616,33 @@ body.dragging-tabs .tabs-container {
3456
3616
  overscroll-behavior: contain;
3457
3617
  -webkit-overflow-scrolling: touch;
3458
3618
  touch-action: pan-y;
3619
+ /* Fill available space */
3620
+ flex: 1;
3621
+ min-height: 0;
3622
+ /* Override the height: 100% !important from general styles */
3623
+ height: auto !important;
3624
+ /* Firefox scrollbar */
3625
+ scrollbar-width: thin;
3626
+ scrollbar-color: var(--bg-hover) var(--bg-primary);
3627
+ }
3628
+
3629
+ /* Ensure scrollbars are visible on mobile */
3630
+ .terminal-container .xterm-viewport::-webkit-scrollbar {
3631
+ width: 8px !important;
3632
+ height: 8px !important;
3633
+ }
3634
+
3635
+ .terminal-container .xterm-viewport::-webkit-scrollbar-track {
3636
+ background: var(--bg-primary) !important;
3637
+ }
3638
+
3639
+ .terminal-container .xterm-viewport::-webkit-scrollbar-thumb {
3640
+ background: var(--bg-hover) !important;
3641
+ border-radius: 4px !important;
3642
+ }
3643
+
3644
+ .terminal-container .xterm-viewport::-webkit-scrollbar-thumb:hover {
3645
+ background: var(--border-light) !important;
3459
3646
  }
3460
3647
 
3461
3648
  .terminal-container .xterm-screen {
@@ -3467,8 +3654,15 @@ body.dragging-tabs .tabs-container {
3467
3654
  }
3468
3655
 
3469
3656
  .terminal-wrapper {
3470
- overflow: hidden !important;
3471
- max-height: 100%;
3657
+ /* Position absolute to fill terminals-container */
3658
+ position: absolute;
3659
+ top: 0;
3660
+ left: 0;
3661
+ right: 0;
3662
+ bottom: 0;
3663
+ /* Allow overflow for selection handles */
3664
+ overflow: visible;
3665
+ min-height: 100px; /* Ensure minimum height for initialization */
3472
3666
  padding: 0; /* Remove padding on mobile to maximize terminal space */
3473
3667
  }
3474
3668
 
@@ -3479,7 +3673,9 @@ body.dragging-tabs .tabs-container {
3479
3673
 
3480
3674
  .terminals-container {
3481
3675
  overflow: hidden !important;
3482
- max-height: 100%;
3676
+ /* Fill available space in flex container */
3677
+ flex: 1;
3678
+ min-height: 100px; /* Ensure minimum height for initialization */
3483
3679
  }
3484
3680
 
3485
3681
  /* Add bottom margin when keyboard is hidden */
@@ -3489,8 +3685,8 @@ body.dragging-tabs .tabs-container {
3489
3685
 
3490
3686
  /* SFTP container should fill available space on mobile */
3491
3687
  .sftp-container {
3492
- height: 100%;
3493
- min-height: 100%;
3688
+ flex: 1;
3689
+ min-height: 100px; /* Ensure minimum height for initialization */
3494
3690
  }
3495
3691
  }
3496
3692
 
@@ -3816,4 +4012,431 @@ body.dragging-tabs .tabs-container {
3816
4012
 
3817
4013
  [data-theme="light"] .update-overlay-content {
3818
4014
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
4015
+ }
4016
+
4017
+ /* Mobile-friendly context menu styles */
4018
+ @media (max-width: 768px) {
4019
+ .terminal-context-menu {
4020
+ min-width: 160px;
4021
+ }
4022
+
4023
+ .terminal-context-menu-item {
4024
+ padding: 12px 16px;
4025
+ font-size: 14px;
4026
+ }
4027
+
4028
+ .terminal-context-menu-item i {
4029
+ width: 20px;
4030
+ font-size: 16px;
4031
+ }
4032
+
4033
+ /* Enable native touch selection on mobile for terminal */
4034
+ .terminal-container .xterm,
4035
+ .terminal-container .xterm-screen,
4036
+ .terminal-container .xterm-viewport,
4037
+ .terminal-container .xterm-rows,
4038
+ .terminal-container .xterm-helpers {
4039
+ -webkit-touch-callout: default !important;
4040
+ -webkit-user-select: text !important;
4041
+ -moz-user-select: text !important;
4042
+ -ms-user-select: text !important;
4043
+ user-select: text !important;
4044
+ touch-action: manipulation !important;
4045
+ }
4046
+
4047
+ /* Allow text selection in terminal on mobile */
4048
+ .terminal-container {
4049
+ -webkit-touch-callout: default !important;
4050
+ -webkit-user-select: text !important;
4051
+ -moz-user-select: text !important;
4052
+ -ms-user-select: text !important;
4053
+ user-select: text !important;
4054
+ }
4055
+ }
4056
+
4057
+ /* Paste modal for HTTP contexts */
4058
+ .paste-modal {
4059
+ position: fixed;
4060
+ top: 0;
4061
+ left: 0;
4062
+ right: 0;
4063
+ bottom: 0;
4064
+ background: rgba(0, 0, 0, 0.75);
4065
+ display: flex;
4066
+ align-items: center;
4067
+ justify-content: center;
4068
+ z-index: 10000;
4069
+ animation: fadeIn 0.2s ease;
4070
+ }
4071
+
4072
+ .paste-modal-content {
4073
+ background: var(--bg-primary);
4074
+ border-radius: 8px;
4075
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
4076
+ max-width: 500px;
4077
+ width: 90%;
4078
+ max-height: 80vh;
4079
+ overflow: hidden;
4080
+ animation: slideIn 0.2s ease;
4081
+ }
4082
+
4083
+ .paste-modal-header {
4084
+ display: flex;
4085
+ align-items: center;
4086
+ justify-content: space-between;
4087
+ padding: 16px 20px;
4088
+ border-bottom: 1px solid var(--border-color);
4089
+ }
4090
+
4091
+ .paste-modal-header h3 {
4092
+ margin: 0;
4093
+ font-size: 16px;
4094
+ font-weight: 600;
4095
+ color: var(--text-primary);
4096
+ }
4097
+
4098
+ .paste-modal-close {
4099
+ background: none;
4100
+ border: none;
4101
+ font-size: 24px;
4102
+ color: var(--text-secondary);
4103
+ cursor: pointer;
4104
+ padding: 0;
4105
+ width: 32px;
4106
+ height: 32px;
4107
+ display: flex;
4108
+ align-items: center;
4109
+ justify-content: center;
4110
+ border-radius: 4px;
4111
+ transition: all 0.2s;
4112
+ }
4113
+
4114
+ .paste-modal-close:hover {
4115
+ background: var(--bg-tertiary);
4116
+ color: var(--text-primary);
4117
+ }
4118
+
4119
+ .paste-modal-body {
4120
+ padding: 20px;
4121
+ }
4122
+
4123
+ .paste-modal-body p {
4124
+ margin: 0 0 12px 0;
4125
+ color: var(--text-secondary);
4126
+ font-size: 14px;
4127
+ }
4128
+
4129
+ .paste-textarea {
4130
+ width: 100%;
4131
+ min-height: 120px;
4132
+ padding: 12px;
4133
+ border: 1px solid var(--border-color);
4134
+ border-radius: 6px;
4135
+ background: var(--bg-secondary);
4136
+ color: var(--text-primary);
4137
+ font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
4138
+ font-size: 13px;
4139
+ resize: vertical;
4140
+ outline: none;
4141
+ transition: border-color 0.2s;
4142
+ }
4143
+
4144
+ .paste-textarea:focus {
4145
+ border-color: var(--accent-primary);
4146
+ }
4147
+
4148
+ .paste-textarea::placeholder {
4149
+ color: var(--text-tertiary);
4150
+ }
4151
+
4152
+ .paste-modal-footer {
4153
+ display: flex;
4154
+ justify-content: flex-end;
4155
+ gap: 12px;
4156
+ padding: 16px 20px;
4157
+ border-top: 1px solid var(--border-color);
4158
+ }
4159
+
4160
+ .paste-modal-btn {
4161
+ padding: 8px 16px;
4162
+ border: none;
4163
+ border-radius: 6px;
4164
+ font-size: 14px;
4165
+ font-weight: 500;
4166
+ cursor: pointer;
4167
+ transition: all 0.2s;
4168
+ }
4169
+
4170
+ .paste-modal-cancel {
4171
+ background: var(--bg-tertiary);
4172
+ color: var(--text-primary);
4173
+ }
4174
+
4175
+ .paste-modal-cancel:hover {
4176
+ background: var(--bg-secondary);
4177
+ }
4178
+
4179
+ .paste-modal-submit {
4180
+ background: var(--accent-primary);
4181
+ color: white;
4182
+ }
4183
+
4184
+ .paste-modal-submit:hover {
4185
+ background: var(--accent-secondary);
4186
+ }
4187
+
4188
+ /* Light theme adjustments for paste modal */
4189
+ [data-theme="light"] .paste-modal {
4190
+ background: rgba(0, 0, 0, 0.5);
4191
+ }
4192
+
4193
+ [data-theme="light"] .paste-modal-content {
4194
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
4195
+ }
4196
+
4197
+ /* ============================================
4198
+ MOBILE TERMINAL SELECTION AND CONTEXT MENU
4199
+ ============================================ */
4200
+
4201
+ /* Mobile terminal padding - add space around terminal text */
4202
+ @media (max-width: 768px), (pointer: coarse) {
4203
+ .terminal-container .xterm {
4204
+ padding: 6px 8px !important;
4205
+ }
4206
+
4207
+ .terminal-container .xterm-viewport {
4208
+ padding: 6px 8px !important;
4209
+ }
4210
+
4211
+ .terminal-container .xterm-screen {
4212
+ padding: 6px 8px !important;
4213
+ }
4214
+ }
4215
+
4216
+ /* Mobile selection overlay - highlights selected text */
4217
+ .mobile-selection-overlay {
4218
+ position: absolute;
4219
+ top: 0;
4220
+ left: 0;
4221
+ right: 0;
4222
+ bottom: 0;
4223
+ pointer-events: none;
4224
+ z-index: 10;
4225
+ }
4226
+
4227
+ .mobile-selection-rect {
4228
+ position: absolute;
4229
+ background: rgba(38, 79, 120, 0.4);
4230
+ border: 1px solid rgba(38, 79, 120, 0.6);
4231
+ border-radius: 2px;
4232
+ }
4233
+
4234
+ /* Mobile selection handles - draggable anchors */
4235
+ .mobile-selection-handle {
4236
+ position: absolute;
4237
+ width: 20px;
4238
+ height: 20px;
4239
+ z-index: 100;
4240
+ cursor: pointer;
4241
+ touch-action: none;
4242
+ -webkit-tap-highlight-color: transparent;
4243
+ }
4244
+
4245
+ .mobile-selection-handle-start {
4246
+ transform: translate(-50%, -100%);
4247
+ }
4248
+
4249
+ .mobile-selection-handle-end {
4250
+ transform: translate(-50%, 0%);
4251
+ }
4252
+
4253
+ .handle-visual {
4254
+ width: 100%;
4255
+ height: 100%;
4256
+ background: var(--accent-primary, #c10059);
4257
+ border-radius: 50%;
4258
+ border: 2px solid white;
4259
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
4260
+ transition: transform 0.15s ease, box-shadow 0.15s ease;
4261
+ }
4262
+
4263
+ .mobile-selection-handle.active .handle-visual {
4264
+ transform: scale(1.2);
4265
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
4266
+ }
4267
+
4268
+ /* Mobile context menu - single row with buttons */
4269
+ .mobile-context-menu {
4270
+ position: fixed;
4271
+ background: var(--bg-secondary, #161b22);
4272
+ border: 1px solid var(--border-color, #30363d);
4273
+ border-radius: 4px;
4274
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
4275
+ z-index: 10000;
4276
+ padding: 3px;
4277
+ animation: mobile-menu-fade-in 0.15s ease;
4278
+ }
4279
+
4280
+ @keyframes mobile-menu-fade-in {
4281
+ from {
4282
+ opacity: 0;
4283
+ transform: scale(0.95);
4284
+ }
4285
+ to {
4286
+ opacity: 1;
4287
+ transform: scale(1);
4288
+ }
4289
+ }
4290
+
4291
+ /* Single row menu layout */
4292
+ .mobile-menu-row {
4293
+ display: flex;
4294
+ align-items: center;
4295
+ gap: 1px;
4296
+ }
4297
+
4298
+ /* Drag handle for context menu */
4299
+ .mobile-menu-drag-handle {
4300
+ display: flex;
4301
+ align-items: center;
4302
+ justify-content: center;
4303
+ padding: 2px 0;
4304
+ cursor: grab;
4305
+ color: var(--text-secondary, #8b949e);
4306
+ border-bottom: 1px solid var(--border-color, #30363d);
4307
+ margin-bottom: 2px;
4308
+ user-select: none;
4309
+ -webkit-tap-highlight-color: transparent;
4310
+ }
4311
+
4312
+ .mobile-menu-drag-handle:active {
4313
+ cursor: grabbing;
4314
+ }
4315
+
4316
+ .mobile-menu-drag-handle i {
4317
+ font-size: 8px;
4318
+ }
4319
+
4320
+ /* Menu buttons with icons and text */
4321
+ .mobile-menu-btn {
4322
+ display: flex;
4323
+ flex-direction: column;
4324
+ align-items: center;
4325
+ justify-content: center;
4326
+ gap: 0;
4327
+ padding: 4px 6px;
4328
+ background: transparent;
4329
+ border: none;
4330
+ border-radius: 4px;
4331
+ color: var(--text-primary, #e6edf3);
4332
+ font-size: 9px;
4333
+ cursor: pointer;
4334
+ transition: background 0.15s ease;
4335
+ -webkit-tap-highlight-color: transparent;
4336
+ user-select: none;
4337
+ min-width: 30px;
4338
+ }
4339
+
4340
+ .mobile-menu-btn:hover {
4341
+ background: var(--bg-tertiary, #21262d);
4342
+ }
4343
+
4344
+ .mobile-menu-btn:active {
4345
+ background: var(--accent-primary, #c10059);
4346
+ color: white;
4347
+ }
4348
+
4349
+ .mobile-menu-btn i {
4350
+ font-size: 12px;
4351
+ color: var(--text-secondary, #8b949e);
4352
+ }
4353
+
4354
+ .mobile-menu-btn:active i {
4355
+ color: white;
4356
+ }
4357
+
4358
+ .mobile-menu-btn span {
4359
+ font-size: 8px;
4360
+ font-weight: 500;
4361
+ }
4362
+
4363
+ /* Hidden textarea for mobile keyboard input */
4364
+ .mobile-hidden-textarea {
4365
+ position: fixed !important;
4366
+ left: -9999px !important;
4367
+ top: 0 !important;
4368
+ width: 1px !important;
4369
+ height: 1px !important;
4370
+ opacity: 0 !important;
4371
+ pointer-events: none !important;
4372
+ font-size: 16px !important; /* Prevent zoom on iOS */
4373
+ }
4374
+
4375
+ /* Mobile-specific terminal adjustments */
4376
+ @media (max-width: 768px) {
4377
+ /* Ensure terminal container allows for selection handles */
4378
+ .terminal-container {
4379
+ position: relative;
4380
+ overflow: visible;
4381
+ }
4382
+
4383
+ /* Terminal wrapper needs to contain selection elements */
4384
+ /* Keep position: absolute to fill the terminals-container */
4385
+ .terminal-wrapper {
4386
+ position: absolute;
4387
+ top: 0;
4388
+ left: 0;
4389
+ right: 0;
4390
+ bottom: 0;
4391
+ overflow: visible;
4392
+ }
4393
+
4394
+ /* Disable native text selection in terminal on mobile */
4395
+ .terminal-container .xterm {
4396
+ -webkit-user-select: none;
4397
+ -moz-user-select: none;
4398
+ -ms-user-select: none;
4399
+ user-select: none;
4400
+ }
4401
+
4402
+ /* Note: xterm-viewport scrolling is handled by the earlier mobile-specific styles (lines 3586-3600) */
4403
+ /* Selection handles are positioned absolutely and don't need overflow: visible on viewport */
4404
+
4405
+ /* Ensure selection handles are visible above terminal */
4406
+ .xterm-screen {
4407
+ z-index: 1;
4408
+ }
4409
+
4410
+ /* Mobile context menu adjustments */
4411
+ .mobile-context-menu {
4412
+ max-width: calc(100vw - 32px);
4413
+ }
4414
+
4415
+ .mobile-menu-btn {
4416
+ min-height: 36px; /* Compact touch target matching button size */
4417
+ }
4418
+ }
4419
+
4420
+ /* Light theme adjustments for mobile elements */
4421
+ [data-theme="light"] .mobile-selection-rect {
4422
+ background: rgba(38, 79, 120, 0.3);
4423
+ border-color: rgba(38, 79, 120, 0.5);
4424
+ }
4425
+
4426
+ [data-theme="light"] .mobile-context-menu {
4427
+ background: #ffffff;
4428
+ border-color: #d0d7de;
4429
+ box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
4430
+ }
4431
+
4432
+ [data-theme="light"] .mobile-menu-btn {
4433
+ color: #24292f;
4434
+ }
4435
+
4436
+ [data-theme="light"] .mobile-menu-btn:hover {
4437
+ background: #f6f8fa;
4438
+ }
4439
+
4440
+ [data-theme="light"] .mobile-menu-btn i {
4441
+ color: #656d76;
3819
4442
  }