MediaWiki:Tabs.css

From CoraTO Wiki - Official Wiki
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.

.tab-content {
  display: none;
  background: var(--surface);
  border-radius: 20px;
  border: 2px solid var(--border);
  box-shadow: 0 6px 24px var(--shadow-medium);
  padding: 30px 20px;
}

.tab-content.active {
  margin: 0 auto;            
  max-width: 1200px;         
  width: 90%;                
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 4px 10px var(--shadow-soft);
  padding: 20px 40px;
  box-sizing: border-box;
  display: block;
  animation: fadeIn .35s ease;
}
   
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 8px;
  padding: 12px 20px;
  list-style: none;
  border-bottom: none;
  justify-content: center;
  margin-bottom: 12px;
}

.nav-tab{
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-block;
  
}

.nav-tab:hover {
  background: var(--surface-tint);
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-soft);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-color: var(--primary);
  color: var(--text-strong);
  box-shadow: 0 4px 12px var(--shadow-medium);
  position: relative;
  animation: floatUpDown 2.5s ease-in-out infinite;
}

.nav-tab .short-text {
  display: none;
}

.nav-tab .full-text {
  display: inline;
}

.tab-footer {
  display: flex;
  justify-content: center;
}


/* [NAVIGATION] NESTED TABS
   ======================================== */
.nested-tabs {
  margin: 20px 0;
  padding: 5px;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.nested-tab {
  background: var(--surface);
  border: 2px solid var(--border);
  border-bottom: 5px solid var(--border);
  border-radius: 50px;
  padding: 10px 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-weight: 700;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  box-shadow: 0 4px 10px var(--shadow-soft);
  position: relative;
  top: 0;
}

.nested-tab:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  border-bottom-color: var(--border-strong);
  color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--shadow-medium);
}

.nested-tab:active {
  border-bottom-width: 2px;
  transform: translateY(0);
  box-shadow: none;
  transition: all 0.1s ease;
}

.nested-tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border: 2px solid var(--primary);
  border-bottom: 5px solid color-mix(in srgb, var(--primary) 80%, black);
  color: var(--text-strong);
  box-shadow: 0 10px 25px var(--shadow-strong);
  transform: translateY(-4px) scale(1.05);
  animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 10px 25px var(--shadow-strong); }
  50% { box-shadow: 0 10px 35px var(--shadow-strong), 0 0 15px var(--shadow-soft); }
}

.nested-content {
  display: none;
  padding: 16px;
  background: var(--bg-1);
  border-radius: 14px;
  margin-top: 8px;
  border: 1px solid var(--border);
}

.nested-content.active {
  display: grid;
  animation: fadeIn .25s ease;
  min-width: 0;
}

/* Show nested tabs and content in active parent tabs that have them */
.tab-content.active .nested-tabs {
  display: flex;
  visibility: visible;
}

.tab-content.active .nested-content.active {
  display: grid;
}

/* Hide nested tabs and content in inactive parent tabs */
.tab-content:not(.active) .nested-tabs {
  display: none;
}

.tab-content:not(.active) .nested-content {
  display: none;
}

.mw-parser-output .nested-tab .short-text {
  display: none;
}

.mw-parser-output .nested-tab .full-text {
  display: inline;
}


/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Desktop médio: 992px - 1199px */
@media (max-width: 1199px) {
  .tab-content {
    padding: 25px 18px;
    border-radius: 18px;
  }
  
  .tab-content.active {
    padding: 18px 35px;
    border-radius: 14px;
  }
  
  .nav-tabs {
    padding: 10px 18px;
    gap: 6px 6px;
    margin-bottom: 10px;
  }
  
  .nav-tab {
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
  }
  
  .nav-tab.active {
    padding: 10px 18px;
  }
}

/* Desktop pequeno: 768px - 991px */
@media (max-width: 991px) {
  .tab-content {
    padding: 20px 15px;
    border-radius: 16px;
  }
  
  .tab-content.active {
    padding: 15px 30px;
    border-radius: 12px;
    width: 95%;
  }
  
  .nav-tabs {
    padding: 8px 15px;
    gap: 8px 8px;
    margin-bottom: 8px;
    justify-content: center;
  }
  
  .nav-tab {
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.85rem;
    flex: 0 0 calc(50% - 4px);
    max-width: calc(50% - 4px);
    text-align: center;
  }
  
  .nav-tab.active {
    padding: 8px 15px;
  }
}

/* Tablet: 576px - 767px */
@media (max-width: 767px) {
  .tab-content {
    padding: 18px 12px;
    border-radius: 14px;
  }
  
  .tab-content.active {
    padding: 12px 25px;
    border-radius: 10px;
    width: 98%;
  }
  
  .nav-tabs {
    padding: 6px 12px;
    gap: 6px 6px;
    margin-bottom: 6px;
    justify-content: center;
  }
  
  .nav-tab {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    flex: 0 0 calc(50% - 3px);
    max-width: calc(50% - 3px);
    text-align: center;
  }
  
  .nav-tab.active {
    padding: 6px 12px;
  }
  
  .nav-tab:hover {
    transform: translateY(-1px);
  }
}

/* Mobile: até 575px */
@media (max-width: 575px) {
  .tab-content {
    padding: 15px 10px;
    border-radius: 12px;
  }
  
  .tab-content.active {
    padding: 8px 12px;
    border-radius: 8px;
    width: 100%;
  }
  .nested-content.active { padding: 8px 12px }
  
  .nav-tabs {
    padding: 4px 10px;
    gap: 4px 4px;
    margin-bottom: 4px;
    justify-content: center;
  }
  
  .nav-tab {
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    flex: 0 0 calc(50% - 2px);
    max-width: calc(50% - 2px);
    text-align: center;
  }
  
  .nav-tab.active {
    padding: 5px 8px;
  }
  
  .nav-tab:hover {
    transform: none;
  }
	
}
  
 @keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatUpDown {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}