/*
Theme Name: Enfold Child
Description: A <a href='http://codex.wordpress.org/Child_Themes'>Child Theme</a> for the Enfold Wordpress Theme. If you plan to do a lot of file modifications we recommend to use this Theme instead of the original Theme. Updating will be much easier then.
Version: 1.0
Author: Kriesi
Author URI: http://www.kriesi.at
Template: enfold
*/



/*Add your own styles here:*/

/* Popup-kalendern */
#calendarModal {
  background: rgba(0,0,0,0.8) !important;
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  justify-content: center;
  align-items: center;
}

#calendarModal .calendar-modal-content {
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  background: #fff;
  width: 90%; 
  max-width: 1000px;
  height: 80%;
  display: flex;
  flex-direction: column;
}

#calendarModal .calendar-modal-header {
  padding: 10px;
  text-align: right;
  background: #2d2d2d;
  color: #fff;
}

#calendarModal iframe {
  border: 0;
  width: 100%;
  height: 100%;
}

#calendarModal .close-btn {
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
}


/* ==============================
   VMC Chatbot
============================== */

/* Overlay */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}
.popup-overlay.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Popup */
.popup-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
}
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }
@keyframes slideUp { from {transform:translateY(30px);opacity:0;} to {transform:translateY(0);opacity:1;} }

/* Flytande knapp */
.coach-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #004F9F 0%, #003B75 100%); /* VMC blå */
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,79,159,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 999;
  animation: pulse 2s infinite;
}
.coach-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(0,79,159,0.6);
}
@keyframes pulse {
  0%,100% { box-shadow:0 8px 24px rgba(0,79,159,0.4);}
  50% { box-shadow:0 8px 32px rgba(0,79,159,0.8);}
}

/* Header */
.chatbot-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.chatbot-logo {
  width: 60px; height: auto;
}
.chatbot-header h2 {
  font-size: 1.5rem;
  color: #004F9F;
  margin: 0;
}
.chatbot-header p {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
}

/* Input */
.chatbot-input-area textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 0.5rem;
}
.chatbot-input-area textarea:focus {
  outline: none;
  border-color: #004F9F;
  box-shadow: 0 0 0 2px rgba(0,79,159,0.2);
}

/* === Murre – ljus, modern chat-widget nere till höger === */

/* Launcher-knapp nere till höger */
.murre-launcher {
  position: fixed;
  bottom: 40px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  border: 1px solid #d1d5db;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9998;
  padding: 0;
}

.murre-launcher-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
}

/* Själva widget-rutan */
#coachPopup.murre-widget {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 420px;
  max-width: 95vw;
  max-height: 728px;
  background: #f9fafb;
  color: #111827;
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.35);
  border: 1px solid #e5e7eb;
  display: none;             /* öppnas via .active i JS */
  z-index: 9999;
  box-sizing: border-box;
}

#coachPopup.murre-widget * {
  box-sizing: border-box;
}

#coachPopup.murre-widget.active {
  display: flex;
}

.murre-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

/* Header – ljus, subtil */
.murre-header {
  padding: 10px 14px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.murre-header-main h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.murre-header-main p {
  margin: 0;
  font-size: 11px;
  color: #6b7280;
}

.murre-close {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

/* Kropp: meddelanden + status + input */
.murre-body {
  display: flex;
  flex-direction: column;
  padding: 10px;
  gap: 8px;
  min-height: 0;
}

/* Meddelandelista */
.murre-messages {
  flex: 1;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
  font-size: 13px;
  background: #ffffff;
  overflow-y: auto;
  min-height: 140px;
  max-height: 468px;
}

/* En rad i chatten */
.murre-message {
  display: flex;
  margin-bottom: 6px;
}

.murre-message-assistant {
  justify-content: flex-start;
}

.murre-message-user {
  justify-content: flex-end;
}

.murre-bubble {
  max-width: 78%;
  padding: 7px 10px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.06);
}

/* Murre-bubblor (vänster) */
.murre-message-assistant .murre-bubble {
  background: #f3f4f6;
  color: #111827;
  border-radius: 14px 14px 14px 4px;
}

/* Användar-bubblor (höger) */
.murre-message-user .murre-bubble {
  background: #2563eb;
  color: #f9fafb;
  border-radius: 14px 14px 4px 14px;
}

/* Status-rad ("Murre tänker...") */
.murre-status {
  font-size: 11px;
  color: #6b7280;
  min-height: 16px;
}

/* Input-raden */
.murre-input-row {
  display: flex;
  gap: 8px;
  margin-top: 2px;
}

.murre-input {
  flex: 1;
  resize: none;
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 13px;
  padding: 10px 12px;
  min-height: 42px;
  max-height: 90px;
  line-height: 1.3;
}

.murre-input::placeholder {
  color: #9ca3af;
}

.murre-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
}

/* Skicka-knappen */
.murre-send {
  border-radius: 999px;
  border: none;
  padding: 0 16px;
  background: #2563eb;
  color: #f9fafb;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  height: 42px;
  align-self: flex-end;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.murre-send:hover {
  background: #1d4ed8;
}

/* Prickar för "Murre tänker..." */
.murre-status .dots {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
}
.murre-status .dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #9ca3af;
  opacity: 0.3;
  animation: murre-dot 1s infinite ease-in-out;
}
.murre-status .dot:nth-child(2) { animation-delay: 0.15s; }
.murre-status .dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes murre-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.3; }
  40% { transform: translateY(-2px); opacity: 0.95; }
}
/* === Murre – eskalering till människa === */

.murre-escalate-trigger {
  margin-top: 6px;
  align-self: flex-start;
  border: none;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* Modal inuti widgeten */
.murre-widget .murre-inner {
  position: relative;
}

.murre-escalate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.murre-escalate-backdrop.active {
  display: flex;
}

.murre-escalate-dialog {
  background: #ffffff;
  color: #111827;
  border-radius: 14px;
  padding: 14px 16px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.35);
  border: 1px solid #e5e7eb;
  font-size: 13px;
}

.murre-escalate-dialog h3 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 600;
}

.murre-escalate-dialog p {
  margin: 0 0 8px 0;
  font-size: 12px;
  color: #6b7280;
}

.murre-escalate-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.murre-escalate-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
}

.murre-escalate-option:hover {
  background: #f3f4f6;
}

.murre-escalate-option input {
  margin: 0;
}

.murre-escalate-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.murre-escalate-cancel,
.murre-escalate-send {
  border-radius: 999px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}

.murre-escalate-send {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.35);
}

.murre-escalate-send:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

.murre-escalate-status {
  margin-top: 6px;
  font-size: 11px;
  color: #4b5563;
}

/* Enkel spinner i knappen */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.6);
  border-top-color: transparent;
  margin-right: 6px;
  animation: murre-spin 0.7s linear infinite;
}

@keyframes murre-spin {
  to { transform: rotate(360deg); }
}