/**
 * Mobile-First Enhancements
 * Otimizações específicas para dispositivos móveis
 */

/* ============================================
   PREVENIR DUPLICAÇÃO DE ÍCONES EM BOTÕES
   Remove todos os pseudo-elementos ::before e ::after
   Aplicado globalmente (PC e Mobile)
   ============================================ */
.btn-photo-action::before,
.btn-photo-action::after,
.btn-open-camera-item::before,
.btn-open-camera-item::after,
.btn-open-camera-app::before,
.btn-open-camera-app::after,
.btn-edit-photo::before,
.btn-edit-photo::after,
.btn-delete-photo::before,
.btn-delete-photo::after,
.btn-replace-photo::before,
.btn-replace-photo::after,
.btn-capture::before,
.btn-capture::after,
.btn-cancel::before,
.btn-cancel::after,
.btn-add-photo::before,
.btn-add-photo::after,
.btn-file-input::before,
.btn-file-input::after,
.btn-close-view::before,
.btn-close-view::after,
.btn-close-photo-modal::before,
.btn-close-photo-modal::after,
.btn-close-editor::before,
.btn-close-editor::after,
.btn-confirm-photo::before,
.btn-confirm-photo::after,
.btn-confirm-photo-item::before,
.btn-confirm-photo-item::after,
.btn-save-editor::before,
.btn-save-editor::after,
.btn-cancel-editor::before,
.btn-cancel-editor::after,
.btn-undo::before,
.btn-undo::after,
.btn-clear::before,
.btn-clear::after,
.tool-btn::before,
.tool-btn::after,
.photo-actions button::before,
.photo-actions button::after,
.photo-capture-actions button::before,
.photo-capture-actions button::after,
.photo-view-actions button::before,
.photo-view-actions button::after,
.photo-editor-actions button::before,
.photo-editor-actions button::after,
.photo-editor-toolbar button::before,
.photo-editor-toolbar button::after,
.photo-selector-header h3::before,
.photo-selector-header h3::after,
.photo-editor-header h3::before,
.photo-editor-header h3::after,
.item-photos-gallery button::before,
.item-photos-gallery button::after,
#recomendaciones-photos-1 button::before,
#recomendaciones-photos-1 button::after,
#recomendaciones-photos-2 button::before,
#recomendaciones-photos-2 button::after,
#recomendaciones-photos-3 button::before,
#recomendaciones-photos-3 button::after,
#conclusion-photos-1 button::before,
#conclusion-photos-1 button::after,
#conclusion-photos-2 button::before,
#conclusion-photos-2 button::after,
#conclusion-photos-3 button::before,
#conclusion-photos-3 button::after,
[data-campo="descripcion"] button::before,
[data-campo="descripcion"] button::after,
[data-campo="intervencion"] button::before,
[data-campo="intervencion"] button::after,
[data-campo="resultado"] button::before,
[data-campo="resultado"] button::after,
[data-campo="recomendaciones"] button::before,
[data-campo="recomendaciones"] button::after,
[data-campo="conclusion"] button::before,
[data-campo="conclusion"] button::after,
[data-campo="verificacion"] button::before,
[data-campo="verificacion"] button::after {
  content: none !important;
  display: none !important;
}

/* Mobile styles for tablets and smaller devices */
@media (max-width: 768px) {

/* ===========================================
   MOBILE-FIRST BASE STYLES
   =========================================== */

/* Inputs e Textareas otimizados para mobile */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
  min-height: var(--touch-target);
  font-size: 16px !important; /* Previne zoom no iOS */
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}

/* Focus states melhorados para mobile */
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.15);
  transform: scale(1.01);
}

/* Botões com altura mínima de toque */
button,
.btn,
.btn-action,
.btn-primary,
.btn-secondary,
.btn-danger {
  min-height: var(--touch-target);
  min-width: var(--touch-target);
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* Feedback visual de toque */
button:active,
.btn:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* ===========================================
   MOBILE LAYOUT IMPROVEMENTS
   =========================================== */

/* Fix content alignment - prevent left shift */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
  }

  main {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem;
    margin: 0;
  }

  /* Header compacto mobile */
  header {
    padding: 0.75rem 1rem;
  }

  h1 {
    font-size: 1.3rem;
  }

  .app-logo-header {
    width: 1.3em;
    height: 1.3em;
  }

  .header-btn {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .language-btn {
    width: 44px;
    height: 44px;
  }

  /* Tab navigation mobile - altura reduzida */
  .tab-navigation {
    top: 52px;
    padding: 0;
  }

  .tab-btn {
    min-width: 50px;
    padding: 0.5rem 0.25rem;
  }

  .tab-icon {
    font-size: 1.5rem;
  }

  .tab-label {
    font-size: 0.75rem;
  }

  /* Bottom action bar mobile - apenas ícones */
  .bottom-action-bar {
    padding: 0.4rem;
    gap: 0.3rem;
  }

  .btn-action {
    font-size: 1.3rem;
    padding: 0.6rem;
    min-height: 44px;
    max-width: 60px;
  }

  /* Cards com padding maior no mobile */
  .card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }
  
  .card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
  }
}

/* Form groups com espaçamento maior */
@media (max-width: 768px) {
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .form-group label {
    font-size: 17px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
  }
  
  .form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

/* ===========================================
   BOTTOM BAR MOBILE OPTIMIZED
   =========================================== */

@media (max-width: 768px) {
  .bottom-action-bar {
    padding: 0.5rem 0.25rem;
    gap: 0.2rem;
    height: auto;
    min-height: 62px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    overflow-x: auto;
    overflow-y: hidden;
    justify-content: space-between;
  }
  
  /* Esconder botão de chat desktop no mobile */
  .btn-chat-desktop {
    display: none !important;
  }
  
  .btn-action {
    padding: 7px 5px;
    font-size: 1.6rem;
    min-height: 56px;
    min-width: 52px;
    max-width: 60px;
    flex: 0 0 auto;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    line-height: 1;
  }
  
  .btn-action span:first-child {
    font-size: 1.5rem;
    line-height: 1;
  }
  
  /* Botão central destacado */
  .btn-generate-center {
    background: linear-gradient(135deg, var(--success), var(--primary));
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    font-weight: 600;
  }
}

/* ===========================================
   MODALS FULLSCREEN NO MOBILE
   =========================================== */

@media (max-width: 768px) {
  .modal {
    padding: 0;
  }
  
  .modal-content {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    overflow-y: auto;
  }
  
  .modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    padding: 0.75rem;
    border-bottom: 2px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .modal-body {
    padding: 0.75rem;
  }
  
  .modal-footer {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 0.75rem;
    border-top: 2px solid var(--border);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
  }
}

/* ===========================================
   FAB MOBILE OPTIMIZED
   =========================================== */

@media (max-width: 768px) {
  .fab {
    width: 60px;
    height: 60px;
    bottom: 85px;
    right: 20px;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
  }
  
  .fab:active {
    transform: scale(0.95);
  }
  
  .fab-icon {
    font-size: 28px;
  }
}

/* ===========================================
   AI CHAT FLOATING BUTTON - MOBILE
   =========================================== */

@media (max-width: 768px) {
  /* Botão flutuante do chat */
  #ai-chat-toggle {
    position: fixed !important;
    bottom: 80px !important;
    right: 20px !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #28a745, #20c997) !important;
    color: white !important;
    font-size: 1.8rem !important;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.4) !important;
    z-index: 999 !important;
    border: none !important;
    cursor: move !important;
    touch-action: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
  }
  
  #ai-chat-toggle:active {
    transform: scale(0.95) !important;
  }
  
  #ai-chat-toggle.dragging {
    box-shadow: 0 8px 30px rgba(40, 167, 69, 0.6) !important;
    transform: scale(1.1) !important;
  }
  
  /* Esconder na lateral */
  #ai-chat-toggle.hidden-left {
    right: auto !important;
    left: -30px !important;
    opacity: 0.3 !important;
  }
  
  #ai-chat-toggle.hidden-right {
    right: -30px !important;
    opacity: 0.3 !important;
  }
  
  /* Container do chat ajustado */
  .ai-chat-container {
    position: fixed !important;
    bottom: 150px !important;
    right: 20px !important;
    left: 20px !important;
    width: auto !important;
    max-width: calc(100vw - 40px) !important;
    max-height: 60vh !important;
    z-index: 1000 !important;
  }
}

/* ===========================================
   PHOTO/CAMERA MODALS - FIT TO SCREEN
   =========================================== */

@media (max-width: 768px) {
  /* Todos os modais */
  .modal {
    padding: 0 !important;
  }
  
  .modal-content {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
  }
  
  .modal-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: white !important;
    border-bottom: 1px solid var(--border) !important;
  }
  
  .modal-body {
    padding: 0.75rem !important;
    max-height: calc(100vh - 100px) !important;
    overflow-y: auto !important;
  }
  
  .modal-footer {
    position: sticky !important;
    bottom: 0 !important;
    background: white !important;
    border-top: 1px solid var(--border) !important;
    padding: 0.75rem !important;
  }
  
  /* Photo modal específico */
  .photo-modal-content {
    display: flex !important;
    flex-direction: column !important;
  }
  
  .photo-preview {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 0.5rem !important;
  }
  
  .photo-preview img {
    max-width: 100% !important;
    max-height: calc(100vh - 250px) !important;
    object-fit: contain !important;
  }
  
  /* Camera controls */
  #camera-controls,
  .photo-actions,
  .photo-options {
    padding: 0.5rem !important;
    gap: 0.4rem !important;
    flex-wrap: wrap !important;
    display: flex !important;
    flex-direction: column !important;
  }
  
  #camera-controls button,
  .photo-actions button,
  .photo-options button,
  .btn-photo-action {
    flex: 1 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    padding: 0.65rem !important;
    font-size: 0.95rem !important;
    min-height: 44px !important;
    border-radius: 8px !important;
    margin: 0 !important;
  }
  
  /* Previne duplicação de ícones em botões - remove ::before e ::after */
  .btn-action::before,
  .btn-action::after,
  .signature-actions button::before,
  .signature-actions button::after,
  .photo-actions button::before,
  .photo-actions button::after,
  .btn-photo-action::before,
  .btn-photo-action::after,
  .btn-open-camera-item::before,
  .btn-open-camera-item::after,
  .btn-open-camera-app::before,
  .btn-open-camera-app::after,
  .btn-edit-photo::before,
  .btn-edit-photo::after,
  .btn-delete-photo::before,
  .btn-delete-photo::after,
  .btn-capture::before,
  .btn-capture::after,
  .btn-cancel::before,
  .btn-cancel::after,
  #camera-controls button::before,
  #camera-controls button::after,
  .btn-add-photo::before,
  .btn-add-photo::after,
  .item-photos-gallery button::before,
  .item-photos-gallery button::after,
  #recomendaciones-photos-1 button::before,
  #recomendaciones-photos-1 button::after,
  #recomendaciones-photos-2 button::before,
  #recomendaciones-photos-2 button::after,
  #recomendaciones-photos-3 button::before,
  #recomendaciones-photos-3 button::after,
  #conclusion-photos-1 button::before,
  #conclusion-photos-1 button::after,
  #conclusion-photos-2 button::before,
  #conclusion-photos-2 button::after,
  #conclusion-photos-3 button::before,
  #conclusion-photos-3 button::after,
  [data-campo="descripcion"] button::before,
  [data-campo="descripcion"] button::after,
  [data-campo="intervencion"] button::before,
  [data-campo="intervencion"] button::after,
  [data-campo="resultado"] button::before,
  [data-campo="resultado"] button::after,
  [data-campo="recomendaciones"] button::before,
  [data-campo="recomendaciones"] button::after,
  [data-campo="conclusion"] button::before,
  [data-campo="conclusion"] button::after {
    content: none !important;
    display: none !important;
  }
}

/* ===========================================
   SIGNATURES - VERTICAL LAYOUT ON MOBILE
   =========================================== */

@media (max-width: 768px) {
  /* Layout vertical: Engenheiro em cima, Cliente embaixo */
  .firmas-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
  }
  
  .signature-section {
    width: 100% !important;
  }
  
  .signature-actions button {
    min-height: 48px;
    padding: 12px 20px;
    font-size: 15px;
  }
}

/* ===========================================
   PHOTO MODALS MOBILE OPTIMIZED
   =========================================== */

@media (max-width: 768px) {
  .photo-modal {
    padding: 0;
  }
  
  .photo-modal-content {
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .photo-preview img {
    max-height: calc(100vh - 200px);
    border-radius: 8px;
  }
  
  .photo-actions {
    padding: 1rem;
    gap: 0.75rem;
  }
  
  .photo-actions button {
    flex: 1;
    min-height: 48px;
    font-size: 15px;
  }
}

/* ===========================================
   EQUIPMENT TABS MOBILE
   =========================================== */

@media (max-width: 768px) {
  .equipment-tabs {
    padding: 0.75rem 0.5rem;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
  }
  
  .equipment-tabs::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
  }
  
  .equipment-tab {
    padding: 10px 16px;
    font-size: 14px;
    min-width: 100px;
    border-radius: 20px;
    white-space: nowrap;
  }
  
  .equipment-icon {
    font-size: 18px;
  }
}

/* ===========================================
   VERIFICATION SECTIONS MOBILE
   =========================================== */

@media (max-width: 768px) {
  .section-card {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 12px;
  }
  
  .section-header {
    padding: 1rem;
    border-radius: 8px 8px 0 0;
  }
  
  .section-title {
    font-size: 1.1rem;
  }
  
  .item-row {
    padding: 1rem;
    gap: 1rem;
  }
  
  .item-label {
    font-size: 15px;
    line-height: 1.5;
  }
  
  .state-badges {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .state-badge {
    padding: 8px 14px;
    font-size: 13px;
    min-width: 90px;
    border-radius: 20px;
  }
}

/* ===========================================
   CORRECTIVE ACTIONS MOBILE
   =========================================== */

@media (max-width: 768px) {
  .action-card {
    padding: 1.25rem;
    border-radius: 12px;
    margin-bottom: 1rem;
  }
  
  .action-header {
    margin-bottom: 1rem;
  }
  
  .action-title-input {
    font-size: 16px;
    padding: 12px;
    min-height: 48px;
  }
  
  .action-delete-btn {
    min-width: 48px;
    min-height: 48px;
    padding: 10px;
  }
  
  .action-section textarea {
    font-size: 15px;
    padding: 12px;
    min-height: 120px;
  }
}

/* ===========================================
   TAB NAVIGATION MOBILE
   =========================================== */

@media (max-width: 768px) {
  .tab-navigation {
    top: 65px;
    padding: 0.5rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  
  .tab-navigation::-webkit-scrollbar {
    display: none;
  }
  
  .tab-btn {
    min-width: 90px;
    padding: 12px 10px;
    gap: 6px;
  }
  
  .tab-icon {
    font-size: 22px;
  }
  
  .tab-label {
    font-size: 12px;
  }
}

/* ===========================================
   LANGUAGE SELECTOR MOBILE
   =========================================== */

@media (max-width: 768px) {
  .language-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
  }
  
  .settings-menu {
    top: 60px;
    right: 5px;
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 80px);
  }

  .settings-menu-content {
    padding: 1rem;
    max-height: calc(100vh - 100px);
  }

  .settings-section h3 {
    font-size: 1.1rem;
  }

  .settings-option {
    padding: 16px 18px;
    font-size: 16px;
    min-height: 52px;
  }

  .language-option {
    padding: 16px 18px;
    font-size: 17px;
  }
}

/* ===========================================
   SWIPE GESTURES VISUAL FEEDBACK
   =========================================== */

@media (max-width: 768px) {
  .equipment-container {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  
  .equipment-tab {
    scroll-snap-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .equipment-tab:active {
    transform: scale(0.96);
  }
}

/* ===========================================
   LOADING STATES MOBILE
   =========================================== */

@media (max-width: 768px) {
  .loading-overlay {
    backdrop-filter: blur(4px);
  }
  
  .loading-spinner {
    width: 60px;
    height: 60px;
    border-width: 4px;
  }
  
  .loading-text {
    font-size: 16px;
    margin-top: 1rem;
  }
}

/* ===========================================
   SAFE AREAS (iPhone X+)
   =========================================== */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  body {
    padding-bottom: calc(140px + env(safe-area-inset-bottom));
  }
  
  .bottom-action-bar {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
  
  .fab {
    bottom: calc(85px + env(safe-area-inset-bottom));
  }
}

/* ===========================================
   LANDSCAPE MODE MOBILE
   =========================================== */

@media (max-width: 768px) and (orientation: landscape) {
  body {
    padding-bottom: 100px;
  }
  
  .bottom-action-bar {
    min-height: 60px;
    padding: 0.5rem;
  }
  
  .btn-action {
    min-height: 60px;
    font-size: 2.5rem;
    line-height: 1;
  }
  
  .btn-action span:first-child {
    font-size: 2.5rem;
    line-height: 1;
  }
  
  .fab {
    width: 52px;
    height: 52px;
    bottom: 70px;
  }
  
  .modal-content {
    max-height: 95vh;
  }
}

/* ===========================================
   SMALL DEVICES (< 480px)
   =========================================== */

@media (max-width: 480px) {
  :root {
    --spacing-mobile: 0.75rem;
  }
  
  header {
    padding: 0.75rem 0.5rem;
  }
  
  h1 {
    font-size: 1.15rem;
  }
  
  .subtitle {
    font-size: 0.75rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .bottom-action-bar {
    padding: 0.35rem 0.15rem;
    gap: 0.15rem;
    min-height: 58px;
  }
  
  .btn-action {
    padding: 6px 3px;
    font-size: 1.4rem;
    min-height: 48px;
    min-width: 42px;
    max-width: 52px;
  }
  
  .btn-action span:first-child {
    font-size: 1.4rem;
  }
}

/* ===========================================
   MOBILE SIGNATURE FULLSCREEN
   =========================================== */

@media (max-width: 768px) {
  /* Fullscreen signature modal for mobile */
  #signature-modal.signature-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  #signature-modal.signature-fullscreen .modal-content {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
  }

  #signature-modal.signature-fullscreen .modal-header {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
  }

  #signature-modal.signature-fullscreen .modal-header h3 {
    font-size: 1.125rem;
    margin: 0;
  }

  #signature-modal.signature-fullscreen .modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    overflow: hidden;
  }

  /* Canvas em modo horizontal - ocupa todo espaço disponível */
  #signature-modal.signature-fullscreen #signature-modal-canvas {
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: calc(100% - 60px); /* Reserve space for buttons */
    border: 2px solid #007bff;
    border-radius: 8px;
    background: #fff;
    touch-action: none;
    cursor: crosshair;
    flex: 1;
  }

  #signature-modal.signature-fullscreen .signature-modal-actions {
    flex-shrink: 0;
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    justify-content: space-between;
  }

  #signature-modal.signature-fullscreen .signature-modal-actions button {
    flex: 1;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    min-height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #signature-modal.signature-fullscreen #clear-signature-modal {
    background: #dc3545;
    color: white;
  }

  #signature-modal.signature-fullscreen #save-signature-modal {
    background: #28a745;
    color: white;
  }

  #signature-modal.signature-fullscreen .modal-close-signature {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    background: transparent;
    border: none;
    color: #333;
    z-index: 10001;
  }

  /* Orientation message for better UX */
  #signature-modal.signature-fullscreen::before {
    content: '💡 Gire o dispositivo para modo paisagem para melhor experiência';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
    max-width: 80%;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }
}

/* Show orientation hint only in portrait mode */
@media (max-width: 768px) and (orientation: portrait) {
  #signature-modal.signature-fullscreen::before {
    opacity: 1;
    animation: fadeInOut 4s ease-in-out;
  }
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}

/* Landscape mode optimization */
@media (max-width: 768px) and (orientation: landscape) {
  #signature-modal.signature-fullscreen .modal-body {
    padding: 0.5rem;
  }

  #signature-modal.signature-fullscreen #signature-modal-canvas {
    max-height: calc(100% - 50px);
  }

  #signature-modal.signature-fullscreen .signature-modal-actions {
    padding-top: 0.5rem;
  }
}

/* ===========================================
   PERFORMANCE OPTIMIZATIONS
   =========================================== */

@media (max-width: 768px) {
  /* GPU acceleration for animations */
  .tab-btn,
  .equipment-tab,
  .btn,
  .card,
  .modal {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
  }
  
  /* Reduce motion for users who prefer it */
  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
}

/* END OF DISABLED MOBILE STYLES - Remove the closing brace above to re-enable */

} /* Close the main @media (max-width: 768px) from line 7 */
