/*
Theme Name: AMEDIS
Theme URI: https://assoc.com.br
Author: Henrique Guerra [ HG ]
Author URI: https://assoc.com.br
Description: Feito com UIKIT, TAILWINDCSS e WORDPRESS
Tested up to: 5.9
Requires PHP: 7.4
Version: 1.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentytwo
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments

Twenty Twenty-Two WordPress Theme, (C) 2021 WordPress.org
Twenty Twenty-Two is distributed under the terms of the GNU GPL.
*/

/*
 * Font smoothing.
 * This is a niche setting that will not be available via Global Styles.
 * https://github.com/WordPress/gutenberg/issues/35934
 */

 /* ===== SCROLLBAR STYLING - LIGHT MODE ===== */

 /* Webkit Browsers (Chrome, Safari, Edge) */
 ::-webkit-scrollbar {
   width: 8px;
   height: 8px;
 }

 ::-webkit-scrollbar-track {
   background: #f1f5f9; /* slate-100 */
   border-radius: 4px;
 }

 ::-webkit-scrollbar-thumb {
   background: #cbd5e1; /* slate-300 */
   border-radius: 4px;
   transition: all 0.2s ease;
 }

 ::-webkit-scrollbar-thumb:hover {
   background: #16a34a; /* accent color */
   box-shadow: 0 0 8px rgba(22, 163, 74, 0.3);
 }

 ::-webkit-scrollbar-corner {
   background: #f1f5f9;
 }

 /* Firefox */
 * {
   scrollbar-width: thin;
   scrollbar-color: #cbd5e1 #f1f5f9;
 }

 /* Mobile Optimization */
 @media (max-width: 768px) {
   ::-webkit-scrollbar {
     width: 6px;
     height: 6px;
   }
 }

 /* Smooth Scrolling */
 html {
   scroll-behavior: smooth;
 }

 /* Custom Scrollable Areas */
 .custom-scroll {
   overflow-y: auto;
   scrollbar-gutter: stable;
 }

 .custom-scroll::-webkit-scrollbar-thumb {
   background: linear-gradient(180deg, #16a34a, #15803d);
 }

 #nova-tarefa-modal[aria-modal="true"] {
   overflow:hidden;
   scrollbar-width: none; /* Firefox */
   scrollbar-gutter: stable;
 }

/* Spinner minimalista para botão de salvar */
.btn-spinner {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  border: 2px solid #fff;
  border-top: 2px solid #38a169;
  border-radius: 50%;
  animation: spinBtn 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 0.5em;
}

@keyframes spinBtn {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.item-saved-highlight {
  animation: highlightSaved 1.2s cubic-bezier(0.4,0,0.2,1);
  background: #e6fffa !important;
  box-shadow: 0 0 0 2px #38a16933;
}
@keyframes highlightSaved {
  0% { background: #e6fffa; box-shadow: 0 0 0 2px #38a16933; }
  80% { background: #e6fffa; box-shadow: 0 0 0 2px #38a16933; }
  100% { background: #fff; box-shadow: none; }
}
/* ========================================
   DATATABLES - ESTILOS GLOBAIS ELEGANTES
   ======================================== */

/* Container principal da DataTable */
.dataTables_wrapper {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* THEAD - Cabeçalho elegante com gradiente verde harmonizado */
.amedis-datatable thead {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.1);
}

.amedis-datatable thead::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);
  pointer-events: none;
}

.amedis-datatable thead th {
  background: transparent !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.025em !important;
  text-transform: uppercase !important;
  padding: 1rem 1.5rem !important;
  border: none !important;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.amedis-datatable thead th:hover {
  background: rgba(255,255,255,0.15) !important;
  transform: translateY(-1px);
}

.amedis-datatable thead th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.amedis-datatable thead th:hover::after {
  transform: scaleX(1);
}

/* Ícones nos cabeçalhos */
.amedis-datatable thead th .header-icon {
  display: inline-flex;
  align-items: center;
  margin-right: 0.5rem;
  opacity: 0.9;
}

/* Setas de ordenação customizadas */
.amedis-datatable thead th.sorting::after,
.amedis-datatable thead th.sorting_asc::after,
.amedis-datatable thead th.sorting_desc::after {
  opacity: 0.7 !important;
  font-size: 0.875rem !important;
  right: 1rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.amedis-datatable thead th.sorting:hover::after,
.amedis-datatable thead th.sorting_asc:hover::after,
.amedis-datatable thead th.sorting_desc:hover::after {
  opacity: 1 !important;
}

/* TBODY - Linhas da tabela */
.amedis-datatable tbody tr {
  transition: all 0.2s ease;
  border-bottom: 1px solid #f1f5f9 !important;
}

.amedis-datatable tbody tr:hover {
  background: linear-gradient(90deg, #f0fdf4 0%, #dcfce7 100%) !important;
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

.amedis-datatable tbody td {
  padding: 1rem 1.5rem !important;
  vertical-align: middle !important;
  border-top: none !important;
}

/* Controles da DataTable harmonizados */
.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
  font-size: 0.875rem;
  color: #374151;
  font-weight: 500;
}

/* SELECT de navegação estilizado */
.dataTables_length select {
  border: 2px solid #d1fae5;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  color: #374151;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1);
  cursor: pointer;
}

.dataTables_length select:focus,
.dataTables_length select:hover {
  outline: none;
  border-color: #22c55e;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1), 0 4px 6px rgba(34, 197, 94, 0.15);
  transform: translateY(-1px);
}

/* INPUT de pesquisa estilizado */
.dataTables_filter input {
  border: 2px solid #d1fae5;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  color: #374151;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1);
  min-width: 250px;
  position: relative;
}

.dataTables_filter input:focus,
.dataTables_filter input:hover {
  outline: none;
  border-color: #22c55e;
  background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1), 0 4px 6px rgba(34, 197, 94, 0.15);
  transform: translateY(-1px);
}

.dataTables_filter input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* Ícone de pesquisa no input */
.dataTables_filter {
  position: relative;
}

/* Labels dos controles */
.dataTables_length label,
.dataTables_filter label {
  font-weight: 300;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Paginação elegante harmonizada */
.dataTables_paginate .paginate_button {
  border: 2px solid #d1fae5 !important;
  border-radius: 0.5rem !important;
  padding: 0.625rem 0 !important;
  margin: 0 0.25rem !important;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%) !important;
  color: #374151 !important;
  font-weight: 500 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1) !important;
}

.dataTables_paginate .paginate_button:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  color: #ffffff !important;
  border-color: #22c55e !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 8px rgba(34, 197, 94, 0.25) !important;
}

.dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  color: #ffffff !important;
  border-color: #22c55e !important;
  box-shadow: 0 2px 4px rgba(34, 197, 94, 0.2) !important;
}

.dataTables_paginate .paginate_button.disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.dataTables_paginate .paginate_button.disabled:hover {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%) !important;
  color: #374151 !important;
  transform: none !important;
  box-shadow: 0 1px 3px rgba(34, 197, 94, 0.1) !important;
}

/* Info text harmonizado */
.dataTables_info {
  color: #6b7280;
  font-weight: 500;
}

/* Responsividade */
@media (max-width: 768px) {
  .amedis-datatable thead th {
    padding: 1rem 0.75rem !important;
    font-size: 0.75rem !important;
  }
  
  .amedis-datatable tbody td {
    padding: 0.75rem 0.75rem !important;
  }
  
  .dataTables_filter input {
    min-width: 200px;
  }
}

/* Loading state harmonizado */
.dataTables_processing {
  background: rgba(255,255,255,0.95) !important;
  border: 2px solid #d1fae5 !important;
  border-radius: 0.75rem !important;
  color: #22c55e !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 6px rgba(34, 197, 94, 0.1) !important;
}

table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
  background-image: none!important;
}


/* TABELAS */

table.dataTable thead th, table.dataTable thead td,
table.dataTable.no-footer {
  border-bottom: 1px solid #e5e7eb;
}

table.dataTable tbody th, table.dataTable tbody td {
    padding: 15px 10px;
}

table.dataTable tbody tr.trAcordeon,
table.dataTable tbody tr.trAcordeon td {
  padding: 0!important;
}

#minhaTabela_wrapper {
  background-color: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;

  & select {
    border-color: #e5e7eb;
    width: 10%;
  }

  & input[type="search"] {
    border-color: #e5e7eb;
  }
}

#minhaTabela_length,
#minhaTabela_filter {
  padding: 10px;
  width: 49%;
}
#minhaTabela_length select,
#minhaTabela_filter input {
  position: relative;
  z-index: 9998;
}
#minhaTabela_filter {
  align-content: end;
}

table.dataTable thead {
  background-color: green;
}

table.dataTable th {
  color: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  text-align: center;
  line-height: normal;  
}
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
  width: auto;
  height: auto;
  border-radius: 14px;
  padding: 5px 15px;
  font-size: 13px;
  line-height: normal;
  text-transform: uppercase;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.previous {
  margin-right: 0;
  padding: 0.625rem 1rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
  margin-left: 4px;
  padding: 0.625rem 1rem !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: green;
  color: #fff!important;
}
#minhaTabela_info,
#minhaTabela_paginate,
.dataTables_wrapper .dataTables_paginate {
  margin: 0;
  padding: 0;
}

.dataTables_wrapper > div:first-child {
  padding: 12px;
  z-index: 0;
}

.dataTables_wrapper > div:nth-child(2) {
  top: 17.5px;
  z-index: 1;
}

.dataTables_wrapper > div:last-child {
  padding: 12px;
}

.dataTables_wrapper .dataTables_length select {
  border-radius: 6px;
  border-color: #e5e7eb;
}

.dataTables_wrapper .dataTables_filter input {
  border-radius: 6px;
  border-color: #e5e7eb;
}

.dataTables_info[role="status"] {
  color: #6b7280;
  font-weight: 300;
  margin: 0;
  padding: 0;  
}

.dataTables_wrapper .dataTables_paginate {
  top: -7px;
  position: relative;
}

.dashboard-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.dashboard-notification.success {
    background-color: #10b981;
}

.dashboard-notification.error {
    background-color: #ef4444;
}

.dashboard-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.dashboard-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
}

.dashboard-notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.dashboard-notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.dashboard-notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.dashboard-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.task-form input:focus,
.task-form textarea:focus,
.task-form select:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.15);
}

.task-form .validation-feedback {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-form > div {
    animation: slideInUp 0.3s ease-out;
}

/* Estados dos botões do modal */
.modal-btn-loading {
    position: relative;
    pointer-events: none;
}

.modal-btn-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hover effects melhorados */
.group:hover svg {
    transform: scale(1.1);
}

.transform:hover {
    transform: scale(1.05);
}

/* Garantir que o botão de criar tarefa tenha o visual correto */
#criar-tarefa-btn {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    color: white !important;
    border: none !important;
}

#criar-tarefa-btn:hover {
    background: linear-gradient(135deg, #15803d, #166534) !important;
    transform: scale(1.05);
}

#criar-tarefa-btn:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
}

#criar-tarefa-btn:disabled:hover {
    background: #9ca3af !important;
}

.editor-btn {
    @apply p-1.5 text-gray-600 hover:text-gray-800 hover:bg-gray-200 rounded transition-colors;
}

.editor-btn.active {
    @apply bg-green-100 text-green-700;
}

#editor-content:empty:before {
    content: attr(data-placeholder);
    @apply text-gray-400;
}

#editor-content:focus:before {
    content: '';
}

#editor-content b, #editor-content strong {
    @apply font-bold;
}

#editor-content i, #editor-content em {
    @apply italic;
}

#editor-content u {
    @apply underline;
}

#editor-content ul {
    @apply list-disc list-inside ml-4;
}

#editor-content li {
    @apply mb-1;
}

kbd {
    @apply font-mono;
}

.editor-btn {
    @apply p-1.5 text-gray-600 hover:text-gray-800 hover:bg-gray-200 rounded transition-colors;
}

.editor-btn.active {
    @apply bg-green-100 text-green-700;
}

#editor-content:empty:before {
    content: attr(data-placeholder);
    @apply text-gray-400;
}

#editor-content:focus:before {
    content: '';
}

#editor-content b, #editor-content strong {
    @apply font-bold;
}

#editor-content i, #editor-content em {
    @apply italic;
}

#editor-content u {
    @apply underline;
}

#editor-content ul {
    @apply list-disc list-inside ml-4;
}

#editor-content li {
    @apply mb-1;
}

kbd {
    @apply font-mono;
}

#checklist-feedback {
    transition: all 0.3s ease;
}

#itens-concluidos > div {
    animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.patient-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.patient-card[style*="display: none"] {
    opacity: 0;
    transform: scale(0.95);
}

.search-highlight {
    background: linear-gradient(120deg, #fef3c7 0%, #fef3c7 100%);
    background-size: 100% 0.2em;
    background-repeat: no-repeat;
    background-position: 0 88%;
}

#search-input:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

#status-filter:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}