/* =======================================================
   JPN LCB - Cookie Modal (clean version)
======================================================= */

html.jpn-lcb-active {
    overflow: hidden;
}

#jpn-lcb .jpn-lcb-overlay {
    overflow-y: auto;
}

#jpn-lcb .jpn-lcb-modal {
    max-height: 90vh;
    overflow-y: auto;
}

/* =======================================================
   Overlay
======================================================= */

#jpn-lcb {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
}

/* Light grey background */
#jpn-lcb .jpn-lcb-overlay {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(215, 215, 215, 0.88);
    backdrop-filter: blur(2px);
}

/* =======================================================
   Modal
======================================================= */

#jpn-lcb .jpn-lcb-modal {
    width: 30em;
    max-width: 92%;
    background: #F9F4E7;
    border-radius: 16px;
    padding: 3.5em 3em;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18);
    animation: jpnLcbFade 0.25s ease-out;
}

.jpn-lcb-more-content p {
	text-align:left !important;
}

/* Fade in */
@keyframes jpnLcbFade {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =======================================================
   Typography
======================================================= */

#jpn-lcb h1 {
    font-size: 1.4em;
    margin: 0;
    text-align: center;
    font-weight: 700;
    color: #074835;
}

#jpn-lcb p {
    font-size: 1em;
    line-height: 1.3em;
    margin-top: 10px;
    text-align: center;
    color: #074835;
}

.jpn-lcb-more-content h3, .jpn-lcb-more-content h4{
	margin-bottom: 10px;
	margin-top: 10px;
}

/* =======================================================
   Toggles
======================================================= */

#jpn-lcb .jpn-lcb-toggles {
    margin-top: 2.5em;
    display: flex;
    flex-direction: column;
    gap: 0.65em;
}

/* Toggle row */
#jpn-lcb .jpn-lcb-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0.65em 1.2em;

    background: #fff;
    border-radius: 12px;

    font-size: 1em;
    color: #074835;
}

/* Checkbox */
#jpn-lcb .jpn-lcb-toggle input {
    transform: scale(1.2);
    cursor: pointer;
}

/* Disabled look (nödvändiga) */
#jpn-lcb .jpn-lcb-toggle input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* =======================================================
   Actions
======================================================= */

#jpn-lcb .jpn-lcb-actions {
    display: flex;
    gap: 0.5em;

    margin-top: 3em;
}

/* Buttons */
#jpn-lcb .jpn-lcb-actions button {
    flex: 1;

    padding: 0.65em;

    font-size: 1em;
    font-weight: 500;
	font-family: 'Poppins';

    border: none;
    border-radius: 14px;

    cursor: pointer;

    transition: all 0.15s ease;
}

/* Primary */
#jpn-lcb-accept-all {
    background: #074835;
    color: #F9F4E7;
}

#jpn-lcb-accept-all:hover {
    filter: brightness(1.1);
}

/* Secondary */
#jpn-lcb-save {
    background: #6f6f6f;
    color: #F9F4E7;
}

#jpn-lcb-save:hover {
    filter: brightness(1.1);
}

/* =======================================================
   Mobile
======================================================= */

@media (max-width: 600px) {

    #jpn-lcb .jpn-lcb-modal {
        padding: 2.2em;
        border-radius: 14px;
    }

    #jpn-lcb .jpn-lcb-actions {
        flex-direction: column;
    }

    #jpn-lcb p {
        font-size: 1em;
    }
}

/* =======================================================
   Reopen button
======================================================= */

#jpn-lcb-reopen {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #074835;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 2147483646;
    transition: all 0.2s ease;
}
@media (max-width: 992px) {
  /* Grundläge: bara när TOC är fixed-bottom */
  body:has(#toc-cont.fixed-bottom) #jpn-lcb-reopen {
    bottom: 75px;
    left: 15px;
    z-index: 10;
    transition: bottom 0.3s ease-in-out;
  }

  /* När TOC både är fixed-bottom OCH har data-open="true" */
  body:has(#toc-cont.fixed-bottom[data-open="true"]) #jpn-lcb-reopen {
    bottom: 395px; /* justera så den hamnar precis ovanför TOC-baren */
  }
}
#toc-cont.fixed-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding-right: 10px;
  padding-left: 10px;
  z-index: 1000;
  transition: 0.3s ease-in-out;
  /* Animation */
  animation: fadeInUp 0.5s ease-out forwards;
}

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

#cookieicon {
	width:30px;
	height: 37px;
	margin-left: 5px;
}

#jpn-lcb-reopen:hover {
    transform: scale(1.08);
}

/* Hide when modal is open */
html.jpn-lcb-active #jpn-lcb-reopen {
    opacity: 0;
    pointer-events: none;
}

/* =======================================================
   Dropdown
======================================================= */


/* Dropdown container */
.jpn-lcb-more {
    margin-top: 20px;
}

/* Toggle button */
.jpn-lcb-more-toggle {
    background: none;
    border: none;
    color: black;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* Hidden content */
.jpn-lcb-more-content {
    display: none;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.5;
}

/* When active */
.jpn-lcb-more.open .jpn-lcb-more-content {
    display: block;
}

.jpn-lcb-more.open .jpn-lcb-more-toggle {
    text-decoration: none;
}
