/* Generell CSS */

body {
  margin: 0;
  font-family: Arial, sans-serif;
}

header {
  background-color: #023047;
  color: white;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1200;
}

.logo a {
  font-weight: bold;
  font-size: 1.2rem;
  color: white;
  text-decoration: none;
}

/* Friendrequest badge */
.nav-icon { position: relative; display: inline-block; margin-left: 15px; }
.badge {
    position: absolute;
    top: -6px; right: -8px;
    background: red;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
}
/* Pulserande färg på klockan när det finns pending requests */
@keyframes colorPulse {
  0%   { color: black; }
  50%  { color: red; }
  100% { color: black; }
}

.nav-icon.pending {
  animation: colorPulse 1s infinite;
}


.menu-toggle {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  height: 25px;
  justify-content: space-between;
}

.menu-toggle span {
  background: white;
  height: 3px;
  border-radius: 2px;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -250px;
  width: 250px;
  height: 100vh;
  background-color: #023047;
  padding-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: left 0.3s ease;
  z-index: 1100;
  overflow-y: auto;
}

.sidebar a {
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  font-size: 1.1rem;
}

.sidebar a:hover {
  background-color: #03506f;
}

.sidebar.active {
  left: 0;
}

.version-info {
  position: absolute;
  bottom: 20px;         /* 20px från nederkanten */
  left: 50%;            /* Flytta mitten till 50% av containern */
  transform: translateX(-50%); /* Justera tillbaka så att den blir helt centrerad */
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1050;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

main {
  padding: 20px;
  margin-top: 60px;
}

.content_placeholder {
  margin: 20px;
  margin-top: 60px;
  padding-bottom: 80px;
  
}

.container { max-width: 600px; margin: auto; padding: 10px; }

/* Error och success start */


.message {
    position: fixed;         /* ligger ovanpå content */
    top: 45px;               /* direkt under header (60px hög) */
    left: 0;
    width: 100%;             /* full bredd */
    padding: 12px 0;         /* vertikal padding */
    text-align: center;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    z-index: 999;           /* ovan header och sidomeny */
}

.message.show {
    opacity: 1;
    transform: translateY(0);
}

.success { background: #d4edda; color: #155724; border-bottom: 1px solid #c3e6cb; }
.error   { background: #f8d7da; color: #721c24; border-bottom: 1px solid #f5c6cb; }

/* Error och success slut */


@media (min-width: 769px) {
  .sidebar {
    left: 0;
    padding-top: 60px;
  }

  .menu-toggle {
    display: none;
  }

  .content_placeholder {
    margin-left: 250px;
    margin-top: 0px;
    padding: 20px;
    padding-bottom: 80px;
  }

  .overlay {
    display: none;
  }

  .footer-sticky {
    margin-left: 250px;
  }
  
}

@media (max-width: 768px) {
  .sidebar {
    left: -250px;
  }

  .sidebar.active {
    left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  /* ✅ Justering: ta bort sidomarginal och ersätt med padding */
  .content_placeholder {
    margin: 0;
    padding: 20px;
    margin-top: 20px;
    padding-bottom: 80px;
  }
    .footer-sticky {
        left: 0;
        width: 100%;
        z-index: 1000;
    }
}

/* FORM */
form {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="file"],
input[type="select"],
input[type="datetime-local"],
button {
    width: 100%;
    padding: 12px;
    margin-bottom: 5px;
    box-sizing: border-box;
    font-size: 1rem;
}

button {
    display: block; /* ✅ Tvinga block så knappen fyller raden */
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 6px;
}

button:hover {
    background-color: #2980b9;
}

.button-link {
    display: block;
    padding: 12px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    font-size: 1rem;
}

.button-link:hover {
    background-color: #2980b9;
}
textarea {
      width: 100%;       /* Tar 100% av förälderns bredd */
      box-sizing: border-box; /* Inkludera padding och border i width */
      padding: 10px;     /* Valfri padding för bättre läsbarhet */
      font-size: 16px;   /* Gör texten lättare att läsa */
      resize: vertical;  /* Tillåter bara vertikal storleksändring */
}


/* FOOTER */


.footer-sticky {
    position: sticky;
    top: 45px; /* Direkt under headern (som är 60px hög) */
    height: 40px;
    background-color: #219653; /* Grönare ton för bättre kontrast */
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000; /* Mellan header (1200) och sidebar (1100) */
    padding: 0;
    font-size: 0.9rem;
    padding: 0 0px;
}

.footer-icon-button {
    color: white;
    background: none;
    border: none;
    font-size: 1.6rem;
    text-decoration: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.footer-icon-button.left {
    margin-right: auto;
}

.footer-icon-button.right {
    margin-left: auto;
}

.footer-text {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
    text-decoration: none;
    height: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.footer-text:hover {
    background-color: #27ae60; /* Lite ljusare grön */
    cursor: pointer;
}

/* FISKEPASSPUFFAR */
.fiskepass-container {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr; /* Default för små skärmar */
}

@media (min-width: 600px) {
    .fiskepass-container {
        grid-template-columns: 1fr 1fr; /* Två i bredd på mellanskärmar */
    }
}

@media (min-width: 1024px) {
    .fiskepass-container {
        grid-template-columns: 1fr 1fr 1fr; /* Tre i bredd på stora skärmar */
    }
}

.fiskepass-puff {
    background-color: #f0f8ff;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%; /* Fyller hela kolumnens bredd */
    box-sizing: border-box;
}

.fiskepass-puff-aktiv {
    width: 100%;
    background-color: #e0f7fa;

    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.fiskepass-puff h3 {
    margin-top: 0;
    font-size: 1.2em;
}

.visa-fangster-lank {
    display: inline-block;
    margin-top: 10px;
    color: #0066cc;
    text-decoration: none;
}

.visa-fangster-lank:hover {
    text-decoration: underline;
}


/* LOADER SPINNER */

#loader {
    display: none;
    margin-top: 20px;
    text-align: center;
}
.loader-spinner {
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}