/* =====================================================================
   app.css - BB Internetbokning

   Grund-css som applikationen kräver, laddas alltid före kundens css.
   Kundanpassningar (typsnitt, färger, logga) läggs i kundens css-fil
   som anges i CSS_FILENAME (valfri), se style_p1-MALL.css.

   Ändra inte denna fil för en enskild kund.
===================================================================== */

/* =====================
   Variabler, kan ändras i kundens css
====================== */
:root {
    --bb-font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    --bb-brand: #2C3340;            /* Meny, modal-rubrik, aktiv menypunkt */
    --bb-brand-contrast: #ffffff;   /* Text på --bb-brand */
    --bb-link: #456380;
    --bb-footer-bg: #f1f2f3;
    --bb-section-header-bg: #f1f2f3; /* Veckorubrik i bokningslistan */
    --bb-sticky-top: 0px;           /* Höjd på ev. fast toppmeny */
}

/* =====================
   Base Element Styles
====================== */
body {
    padding: 0;
    font-family: var(--bb-font-family);
    padding-bottom: 100px;
}
html {
    position: relative;
    min-height: 100%;
}
img {
    border: 0;
}
a {
    text-decoration: none;
    font-weight: 500;
    color: var(--bb-link);
}

/* =====================
   Navigation Styles
====================== */
#mainNav {
    background-color: var(--bb-brand) !important;
}
#mainNav a {
    color: var(--bb-brand-contrast);
}
.topLoggo {
    max-height: 50px;
    max-width: 500px;
}
.nav-item {
    color: #ffffff !important;
    font-weight: 400;
    padding: 4px 8px;
    border-radius: 12px;
    transition: background-color 0.25s ease, color 0.25s ease;
}
.nav-item:hover {
    background-color: #ffffff12;
    padding: 4px 8px;
}
.nav-item-sm {
    color: #ffffffaf !important;
    font-weight: 400;
    padding: 2px 6px;
    font-size: 0.875rem;
    margin-right: 40px;
    transition: transform 0.25s ease, color 0.25s ease;
}
.nav-item-sm:hover {
    color: #ffffffaf !important;
    background-color: #ffffff00;
    font-weight: 400;
    padding: 2px 6px;
    font-size: 0.875rem;
    transform: translateX(-6px);
}

.nav-link {
    color: #ffffff !important;
    font-weight: 400;
    padding: 4px 8px;
    height: 30px;
    display: flex;
    align-items: center;
}
.nav-link-sm {
    color: #ffffffaf !important;
    font-weight: 400;
    padding: 2px 6px;
    height: 24px;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
}

.navbar-nav .nav-link {
    position: relative;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #ffffffff !important;
}

.navbar-nav .nav-item.active,
.navbar-nav .nav-item.active:hover {
    background-color: #ffffff;
    border-radius: 12px;
    animation: navItemBgFade 300ms ease-out;
}

.navbar-nav .nav-item.active .nav-link {
    color: var(--bb-brand) !important;
}

.navbar-nav .nav-link.active:hover,
.navbar-nav .nav-link.active:focus {
    color: var(--bb-brand) !important;
    background-color: #ffffff;
}

@keyframes navItemBgFade {
    0% {
        background-color: rgba(255, 255, 255, 0);
    }
    100% {
        background-color: #ffffff;
    }
}

/* =====================
   Typography & Headings
====================== */
.rubrik {
    font-weight: 600;
    font-size: 1.5em;
}
.ingress {
    font-weight: 400;
}
.underRubbe {
    font-weight: bold;
    font-size: 1.1em;
}
.link {
    font-weight: bold;
    font-size: 1.0em;
}

/* =====================
   System & Error Messages
====================== */
.sysMed {
    color: #993333;
    font-weight: bold;
    margin-bottom: 10px;
    margin-top: 10px;
    display: inline-block;
}
.error {
    color: #993333;
    font-weight: bold;
    font-size: 1.2em;
}

/* =====================
   Layout & Containers
====================== */
#visaText {
    font-size: 1.1em;
}
#kundTextDiv {
    font-size: 1.1em;
}
#h_visaRules {
    display: none;
    margin: 0px 0px 20px 0px;
    width: 350px;
}
#bokaFormPage {
    max-width: 1000px;
}
#logginForm {
    background-color: #f5f5f5;
    border-radius: 12px;
}
#logInOut {
    text-align: right;
    margin: 0px 0px 20px 0px;
    padding: 0;
    font-size: 1.0em;
    color: #555;
}
.footerWrap {
    position: absolute;
    background-color: var(--bb-footer-bg);
    width: 100%;
    bottom: 0;
    left: 0;
    font-size: 0.75em;
}

/* =====================
   Activity Info & Calendar
====================== */
.aktivitetInfoText {
    background-color: #f8f9fa;
    border-radius: 12px;
}
.booked,
.booked div,
.booked span {
    background-color: #e0e0e0;
    color: #999999;
}
.free,
.free div,
.free span {
    background-color: #9abe76;
    color: #333333;
}
.reserved,
.reserved div,
.reserved span {
    background-color: #f8d578;
    color: #333333;
}
.clearFix {
    clear: both;
}

.activity-panel {
    opacity: 1;
    transform: none;
}
.js-enabled .activity-panel {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}
.js-enabled .activity-panel.is-visible {
    opacity: 1;
    transform: none;
}

/* =====================
   Basket Styles
====================== */
.basket-dropdown .nav-link {
    position: relative;
}

.basket-count {
    min-width: 1.5rem;
    text-align: center;
    padding: 4px 5px 4px 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1px;
    background-color: #fff;
    line-height: normal;
}

.basket-dropdown.active .basket-count {
    background-color: #212529;
    color: #ffffff;
    font-weight: 500;
}

.basket-dropdown,
.user-dropdown {
    position: relative;
}

.basket-dropdown-menu,
.user-dropdown-menu {
    width: 320px;
    max-width: calc(100vw - 2rem);
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    z-index: 5000;
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    display: none;
    background-color: #ffffff;
}

.user-dropdown-menu {
    width: 220px;
    padding: 0.75rem 0;
}

.basket-preview {
    padding: 1rem 1.25rem;
}

.basket-preview__header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 0.5rem;
    color: var(--bb-brand);
}

.basket-preview__body {
    max-height: 680px;
    overflow-y: hidden;
}

.basket-preview__item {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.basket-preview__item:last-of-type {
    border-bottom: none;
}

.basket-preview__item strong {
    color: var(--bb-brand);
}

.basket-preview__more {
    padding-top: 0.5rem;
}

.basket-preview__footer {
    text-align: right;
}
.basket-preview__footer .btn {
    min-width: 200px;
}

.basket-dropdown .basket-toggle,
.user-dropdown .user-toggle {
    color: rgba(255, 255, 255, 0.8);
    border: 0;
    background: transparent;
    cursor: pointer;
}

.basket-dropdown .basket-toggle:hover,
.basket-dropdown .basket-toggle:focus,
.basket-dropdown.is-open .basket-toggle,
.user-dropdown .user-toggle:hover,
.user-dropdown .user-toggle:focus,
.user-dropdown.is-open .user-toggle {
    color: #ffffff;
    text-decoration: none;
}

.basket-dropdown.is-open .basket-dropdown-menu,
.user-dropdown.is-open .user-dropdown-menu {
    display: block;
}

.user-dropdown-link {
    display: block;
    padding: 0.5rem 1.25rem;
    color: #e74c3c !important;
    font-size: 0.95rem;
}

.user-dropdown-link:hover,
.user-dropdown-link:focus {
    color: #c9483a !important;
    text-decoration: none;
    border-radius: 12px;
}
.basketItem {
    background-color: #f8f9fa;
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
}
.basketItem td {
    color: #878B94;
}
.basketInfoText {
    color: #303030 !important;
}
.btn-trash {
    color: #ff5353;
    border-radius: 6px;
}
.btn-trash:hover {
    background-color: #00000006;
    color: #ff0000;
}
.deleteItem {
    float: right;
    padding-right: 20px;
}
.basketItemDelLink {
    color: #993333;
}
.basketItemError {
    border: 1px solid;
    border-color: #993333;
}
.basketItemFull {
    background-color: red;
}
.basketItemSuccess {
    background-color: green;
}

/* =====================
   Modal & Button Styles
====================== */
.modal-header {
    background-color: var(--bb-brand);
    color: var(--bb-brand-contrast) !important;
    text-align: center;
}
.successText {
    color: green;
}
.warnText {
    color: red;
}
.dNone {
    display: none;
}

/* =====================
   Status Text Styles
====================== */
.reservedText {
    padding: 6px;
    margin-right: 6px;
    color: #ff9500;
    background-color: #ffffff00;
    font-weight: 500;
}

.selector td, .selector th {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.85rem;
}
.selector {
    margin-bottom: 3rem;
}

/* =====================
   Validation & Info Styles
====================== */
.validateErrorText {
    font-size: 90% !important;
}
.infoPlatta {
    background-color: #f5f5f5;
    border-radius: 12px;
}
.begransad {
    color: red;
}

/* Boostrap Form Validation Check */
.was-validated .form-control:valid,
.form-control.is-valid,
.was-validated .form-select:valid,
.form-select.is-valid {
    background-image: url("/img/check.svg");
    background-size: 1rem;
    background-position: center right 0.75rem;
    background-repeat: no-repeat;
}

/* =====================
   Table & Heading Styles
====================== */
th {
    background-color: #f5f5f5;
    border: none !important;
    font-weight: 500;
}
td {
    border-top: none !important;
}
.firstColHead {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.lastColHead {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* =====================
   Custom Utilities (Tailwind-like)
====================== */
.rounded-none { border-radius: 0 !important; }
.rounded-sm   { border-radius: 0.125rem !important; }
.rounded      { border-radius: 0.25rem !important; }
.rounded-md   { border-radius: 0.375rem !important; }
.rounded-lg   { border-radius: 0.5rem !important; }
.rounded-xl   { border-radius: 0.75rem !important; }
.rounded-2xl  { border-radius: 1rem !important; }
.rounded-3xl  { border-radius: 1.5rem !important; }
.rounded-pill { border-radius: 50rem !important; }

.text-xs   { font-size: 0.75rem !important; }
.text-sm   { font-size: 0.875rem !important; }
.text-base { font-size: 1rem !important; }
.text-lg   { font-size: 1.125rem !important; }
.text-xl   { font-size: 1.25rem !important; }
.text-2xl  { font-size: 1.5rem !important; }
.text-3xl  { font-size: 1.875rem !important; }
.text-4xl  { font-size: 2.25rem !important; }
.text-5xl  { font-size: 3rem !important; }

.font-light    { font-weight: 300 !important; }
.font-normal   { font-weight: 400 !important; }
.font-medium   { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold     { font-weight: 700 !important; }

/* =====================
   Sökformulär bokningslista (booking_search.php)
====================== */
@media (min-width: 768px) {
    #filterForm {
        min-height: 64px;
    }

    /* Fälten deltar i formulärets .row som vanliga kolumner */
    #filterFields {
        display: contents !important;
    }
}

@media (max-width: 767.98px) {
    #filterFields {
        display: flex;
        flex-wrap: wrap;
        row-gap: 0.5rem;
        padding-bottom: 0.5rem;
    }

    #filterFields.collapse:not(.show) {
        display: none;
    }

    .filter-toggle-btn[aria-expanded="true"] .fa-filter {
        opacity: 0.6;
    }
}

/* =====================
   Bokningslista (booking_table_list.php)
====================== */
.chevron-toggle {
    transition: background-color 0.2s;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    color: #909090;
}

.chevron-toggle:hover {
    color: #606060ff;
}

.chevron-toggle .fas {
    transition: transform 0.4s ease;
    transform: rotate(-180deg);
}

.chevron-toggle.is-open .fas {
    transform: rotate(0deg);
}

.collapse-anim {
    display: block;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.45s ease, opacity 0.3s ease;
}

.collapse-anim.show {
    max-height: var(--collapse-height, 9999px);
    opacity: 1;
}

.collapse-anim.is-closing {
    max-height: 0;
    opacity: 0;
}

.booking-toggle-all {
    display: flex;
    justify-content: flex-end;
    margin: 0.5rem 0 0.25rem;
}

.booking-toggle-all-btn {
    font-size: 0.875rem;
    border: none;
    box-shadow: none;
}

.booking-toggle-all-btn:hover {
    opacity: 0.8;
    border: none;
    box-shadow: none;
}

.booking-toggle-all-btn:focus {
    border: none;
    box-shadow: none;
}

.booking-section {
    border-radius: 8px;
    background: #fff;
    margin-bottom: 2rem;
}

.booking-section-header {
    position: sticky;
    top: var(--bb-sticky-top);
    z-index: 2;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
    background-color: var(--bb-section-header-bg);
    margin-top: 1rem;
    cursor: pointer;
}

.booking-row {
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0;
}

.booking-cell {
    flex: 1 1 0;
    padding: 0 0.5rem;
}

.booking-row-mobile {
    border-bottom: 1px solid #eee;
    padding: 0.75rem 0;
    min-height: 56px;
    gap: 0.5rem;
}

.booking-row-mobile.is-bookable:active {
    background-color: #f8f9fa;
}

.booking-cell-mobile {
    padding: 0 0.75rem;
}

@media (max-width: 767.98px) {
    .booking-section {
        margin-bottom: 1rem;
    }
}

/* =====================
   Mina bokningar skeleton loading
====================== */
.booking-page-shell {
    min-height: 320px;
}

.booking-page-content {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.booking-page-content.is-ready,
html:not(.is-bookings-loading) .booking-page-content {
    opacity: 1;
    transform: none;
}

.booking-skeleton-overlay {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 2.5rem 1rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(1.5px);
    transition: opacity 0.35s ease, visibility 0.35s ease;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

html.is-bookings-loading .booking-skeleton-overlay {
    opacity: 1;
    visibility: visible;
}

html.is-bookings-loading .booking-page-content {
    opacity: 0;
    transform: translateY(8px);
}

.skeleton-shimmer {
    position: relative;
    overflow: hidden;
    background-color: #e5e5e5;
    border-radius: 8px;
}

.skeleton-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(300%);
    }
}

.booking-skeleton-heading {
    height: 28px;
    width: 40%;
    max-width: 280px;
}

.booking-skeleton-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.booking-skeleton-filter .skeleton-label {
    height: 16px;
    width: 200px;
    border-radius: 4px;
}

.booking-skeleton-filter .skeleton-input {
    height: 40px;
    width: 220px;
    border-radius: 12px;
}

.booking-skeleton-filter .skeleton-button {
    height: 40px;
    width: 88px;
    border-radius: 999px;
}

.booking-skeleton-table {
    border-radius: 16px;
    border: 1px solid #e4e7ec;
    background: #ffffff;
    overflow: hidden;
}

.booking-skeleton-table .skeleton-table-header,
.booking-skeleton-table .skeleton-table-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
}

.booking-skeleton-table .skeleton-table-header {
    background-color: #f1f3f5;
}

.booking-skeleton-table .skeleton-table-row {
    background-color: #fafafa;
}

.booking-skeleton-table .skeleton-cell {
    height: 16px;
    border-radius: 6px;
}

/* =====================
   Legacy
   Används inte i nuvarande kod, behålls för äldre kundanpassningar.
   Kan tas bort när inga kundfiler längre refererar till dem.
====================== */
#litenLoggaBotom {
    position: relative;
    top: -70px;
    float: right;
}
ul#globalpages, ul#globalpages li {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #cdcdcd;
}
ul#globalpages {
    margin-bottom: 0.6em;
    float: left;
    height: inherit;
    width: inherit;
}
ul#globalpages li.break, .menu-break {
    clear: both;
}
.menu-break {
    margin: 0;
    padding: 0;
}
ul#globalpages li {
    float: left;
}
ul#globalpages li a {
    display: block;
    float: left;
    padding: 0.65em;
    color: #333;
    text-decoration: none;
}
ul#globalpages li.current a {
    background-color: #e4e4e4;
    margin: 0px;
}
ul#globalpages li a:hover {
    background-color: #d8d8d8;
}
#calFilterForm {
    width: 900px;
    margin: 0 auto;
}
#calendar {
    width: 900px;
    margin: 0 auto;
}
.titelLista {
    padding: 10px 0px 5px 20px;
}
.itemDetail {
    padding: 0px 0px 0px 200px;
    margin: 0px 0px 0px 0px;
}
.itemDetailLink {
    display: inline;
    padding: 0px 0px 0px 20px;
}
.faGreen {
    color: red;
}
.greenButton {
    background-color: #9abe76;
    font-weight: bold;
}
.listSearchForm {
    border-bottom: solid 1px;
    border-color: #ccc;
}
.aktKeyDiv {
    margin-top: 10px;
    margin-bottom: 10px;
}
.aktRecDiv {
    margin-left: 10px;
    padding-bottom: 5px;
}
.aktRecDayDiv {
    width: 10%;
    display: inline-block;
}
.aktRecDateDiv {
    width: 40%;
    display: inline-block;
}
.aktRecUrlDiv {
    display: inline-block;
}
