/*
Theme Name: Harmoni Partner
Theme URI: https://partner.harmoni.nu
Author: Harmoni
Description: Eget responsivt tema för partners (guldtema)
Version: 1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: harmoni-partner
*/

/* === Grund === */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #faf9f5;   /* ljus bakgrund med lite värme */
  color: #333;
}

main {
  max-width: 900px;
  margin: 10px auto;
  padding: 1rem;
}

footer {
  text-align: center;
  padding: 1rem;
  background: #f1e6c8;   /* ljus guldig fot */
  margin-top: 2rem;
  color: #5c4a18;
}

/* === Header och navbar === */
header {
  background: #c9a227;   /* guld */
  color: #fff;
  padding: 1rem;
  position: relative;
  z-index: 1002;
}

a {
	text-decoration: none;
	color: #000;
}

a:hover {
	color: #888;
}
header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #fff;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* === Desktopmeny === */
.desktop-menu,
.desktop-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;        /* gör den horisontell */
  gap: 1rem;
  align-items: center;
}

.desktop-menu li {
  margin: 0;
  padding: 0;
}

.desktop-menu a {
  display: block;
  padding: 0.5rem 1rem;  /* gör dem som "knappar" */
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
}

.desktop-menu a:hover {
  background: #a27d1a;   /* mörkare guld vid hover */
}

/* === Hamburgerknapp === */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1003;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
  margin: 4px 0;
  transition: 0.4s;
}

/* === Mobil slide-in meny === */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background: #c9a227; /* guld */
  transition: right 0.3s ease-in-out;
  padding-top: 60px;
  z-index: 1001;
}

.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.mobile-nav li {
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.mobile-nav a {
  display: block;
  padding: 1rem;
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.mobile-nav a:hover {
  background: #a27d1a;   /* mörkare guld på hover */
}

.mobile-nav.show {
  right: 0;
}

/* === Overlay bakom meny === */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}

.menu-overlay.show {
  display: block;
}

/* === Mobilbrytpunkt === */
@media (max-width: 768px) {
  .desktop-menu {
    display: none;
  }
  .hamburger {
    display: flex;
  }
}

/* === Partnerdashboard === */
.harmoni-dashboard {
  padding: 1.5rem;
  background: #fffaf0;
  border: 2px solid #e6cf8b;   /* ljus guldig kant */
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,.08);
  max-width: 600px;
  margin: 2rem auto;
}

.harmoni-dashboard h2 {
  margin-top: 0;
  color: #a27d1a;   /* mörkare guld för rubriker */
}

.harmoni-dashboard p {
  margin: 0.5rem 0;
  color: #5c4a18;
}

.gold-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #c9a227;   /* guld */
  border-color: #c9a227;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}

.gold-btn:hover {
  background: #a27d1a;   /* mörkare guld på hover */
}

/* Success button (green) */
.btn-success {
  
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #198754;  
  border-color: #198754;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
}
.btn-success:hover {
  background-color: #157347;
}


/* Panelen runt formuläret */
.harmoni-login-panel {
  max-width: 520px;
  margin: 16px auto;
  padding: 16px;
  background: #fffdf7;
  border: 1px solid #e7cf85;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

/* Formelement – full bredd på mobil */
#harmoni-login p { margin-bottom: 12px; }
#harmoni-login label { display:block; font-weight:600; margin-bottom:6px; color:#5c4200; }

#harmoni-login input[type="text"],
#harmoni-login input[type="password"],
#harmoni-login input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #c8c8c8;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 16px; /* förhindrar iOS autozoom */
}

#harmoni-login .login-remember {
  display: flex; align-items: center; gap: 8px; margin: 6px 0 12px;
}

/* Knappen */
#harmoni-login #wp-submit {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 6px;
  background: #d4a017; /* din guldton */
  color: #fff; font-weight: 700; cursor: pointer;
  transition: background .2s ease;
}
#harmoni-login #wp-submit:hover { background: #b98b14; }



.ha-lista {
	width: 100%;
	border-collapse: collapse;
	background: white;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.05);
	margin-top: 1.5rem;
	overflow: hidden;
}

.ha-lista th {
	padding: 0.8rem 1rem;
	border-bottom: 1px solid #eee;
	text-align: left;
}

.ha-lista td {
	padding: 0.8rem 1rem;
	border-bottom: 1px solid #eee;
}

.ha-rubrik {
	margin: 0;
	padding: 0.8rem 1rem;
	border-bottom: 1px solid #eee;
	text-align: left;
	background: #a99207;
	color: white;
}

@media (max-width: 450px) {
.ha-lista td {
	padding: 0.8rem 0.8rem;
	border-bottom: 1px solid #eee;
}
.tab-content .ha-lista th {
	padding: 0.4rem 0.5rem;
}
.tab-content .ha-lista td {
	padding: 1rem 0.5rem;
}
}
@media (max-width: 370px) {
	.ha-lista {
		font-size: 12px;
	}
}
.ha-lista thead {
	background: #1A2B4C;
	color: white;
}
.ha-lista a {
	text-decoration: none;
	color: #000;
}

.ha-div {
	width: 100%;
	border-collapse: collapse;
	background: white;
	border-radius: 6px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.05);
	margin-top: 1.5rem;
	overflow: hidden;
}
a {
	color: #333;
	text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
	a:hover {
		color: #bb0;
	}
}

.ha-div-rubrik {
	padding: 0.8rem 1rem;
	border-bottom: 1px solid #eee;
	text-align: left;
	background: #1A2B4C;
	color: white;
}

.ha_pill_outer {
    break-inside: avoid; /* Nyare standard */
    page-break-inside: avoid; /* Äldre stöd */
}

.tab-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: calc(100% - 10px);
}

@media (hover: hover) and (pointer: fine) {
	.ha-lista tbody tr:hover {
		background-color: #ffc;
	}
}
@media (max-width: 988px) {
	.ha-lista th {
		padding: 0.4rem 1rem;
	}
}
@media (max-width: 850px) {
	.widecol1 {
		display: none;
	}
}
@media (min-width: 990px) and (max-width: 1135px) {
	.widecol1 {
		display: none;
	}
}

@media (min-width: 990px) and (max-width: 1135px) {
	.kalWidecol1 {
		display: none;
	}
}

@media (max-width: 650px) {
	.kalWidecol1 {
		display: none;
	}
	.widecol2 {
		display: none;
	}
	.tab-container {
		width: calc(100% - 5px);
	}
}

.tab-scroll-wrapper {
  position: relative;
  overflow: hidden;
}

/* Gör flikarna scrollbara i sidled */
.tab-header {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  gap: 3px;
  scroll-behavior: smooth;
}
.tab-header::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.maintab {
  background: #a99207;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);	
}

.maintab button {
  font-size: 14px;
  flex: 0 0 auto;
  display: inline-flex;
  min-width: 100px;
  background: transparent;
  border: none;
  color: #cc8;
  padding: 0.8rem 0.8rem;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
  justify-content: center;
}
.maintab button:hover {
  background: #897207;
}
.maintab button.tab-link-active {
  background: #c9a227;
  color: #fff;
  border-left: 1px solid #88a;
  border-top: 1px solid #88a;
  border-right: 1px solid #88a;
}

.subtab1 {
  background: #662222;
  border-bottom: 1px solid #ccc;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);	
}

.subtab1 button {
  font-size: 14px;
  flex: 0 0 auto;
  display: inline-flex;
  min-width: 100px;
  background: transparent;
  border: none;
  color: #888;
  padding: 0.8rem 0.8rem;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  font-weight: bold;
  white-space: nowrap;
  justify-content: center;
}
.subtab1 button:hover {
  background: #772222;
}
.subtab1 button.tab-link-active {
  background: #884444;
  color: #fff;
  border-left: 1px solid #88a;
  border-top: 1px solid #88a;
  border-right: 1px solid #88a;
}



/* Fade och pilar */
.fade {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 25px;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 5;
}
.fade-left {
  left: 0;
  background: linear-gradient(to right, #f4f4f4, rgba(244,244,244,0));
}
.fade-right {
  right: 0;
  background: linear-gradient(to left, #f4f4f4, rgba(244,244,244,0));
}
.fade::after {
  content: "›";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  font-size: 20px;
  opacity: 0.8;
}
.fade-left::after {
  content: "‹";
  left: 10px;
}
.fade-right::after {
  right: 10px;
}

.tab-content {
  display: none;
  padding: 0 20px 20px 20px;
  min-height: 200px;
}

.tab-content.tab-active {
  display: block;
}

.tab-wrap {
	overflow: visible;
	position: relative;	
}

.fade[hidden] { display: none !important; }

/* Undermenyer: dolda default */
.subtabs {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 220ms ease, opacity 180ms ease, transform 220ms ease;
  will-change: max-height, opacity, transform;
}

/* När öppen: glider ner */
.subtabs.is-open {
  max-height: 160px; /* sätt lite högre än undermeny-höjden */
  opacity: 1;
  transform: translateY(0);
}

/* (valfritt) extra highlight på parent när undermeny visas */
.tab-link.has-submenu-open {
  box-shadow: inset 0 -45px 0 #662222;
}

/* Parent-diven är ramen */
.parent-frame {}

/* Parentens egna innehåll */
.parent-frame .parent-body { display: block; }

/* När child är aktiv: göm parentens egna body, men låt ramen (diven) vara kvar */
.parent-frame.has-child-active .parent-body { display: none; }

/* Child content ska synas med tab-active precis som vanligt */
.child-content { display: none; }
.child-content.tab-active { display: block; }
