/*
 * Caledros Basic Blocks - Easy to use Gutenberg blocks
 * Copyright (C) 2025  David Arnado
 * 
 * This file is part of Caledros Basic Blocks.
 * 
 * Caledros Basic Blocks is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.

 * Caledros Basic Blocks is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License along
 * with Caledros Basic Blocks; if not, see <https://www.gnu.org/licenses/>.
 */

/*Mobile menu container*/
.cbb-mobile-menu-container
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: var(--cbb-mm-just-content, flex-start);
  align-items: var(--cbb-mm-align-items, normal);
  column-gap: var(--cbb-mm-column-gap, normal);
  height: var(--cbb-mm-height, 0);
  background-size: cover;
  background-blend-mode: overlay;
  border-style: var(--cbb-mm-br-style, none);
  border-width: var(--cbb-mm-br-width, 0px);
  border-radius: var(--cbb-mm-br-radius, 0px);
  padding: var(--cbb-mm-fc-padding, 0px);
  background-position: var(--cbb-mm-bg-position, 0% 0%);
  overflow: var(--cbb-mm-overflow, visible);
  background-color: var(--cbb-mm-light-bg-color, #00000000);
}

/*Ensure direct child elements do not overflow the parent container */
.cbb-mobile-menu-container
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout
  > * {
  height: 100%;
}

.cbb-mobile-menu-container {
  background-color: #00000000;
}

/*Mobile menu container with box shadow*/
.cbb-mobile-menu-container--has-box-shadow
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout {
  box-shadow: var(--cbb-mm-light-box-shadow, none);
}

.cbb-mobile-menu-container--has-box-shadow {
  box-shadow: none;
}

/*Mobile menu container with border*/
.cbb-mobile-menu-container--has-border
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout {
  border-color: var(--cbb-mm-light-border-color, "#00000000");
}

.cbb-mobile-menu-container--has-border {
  border-color: "#00000000";
}

/*Mobile menu container with background gradient*/
.cbb-mobile-menu-container--has-bg-gradient
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout {
  background-image: var(--cbb-mm-light-bg-gradient, none);
}

.cbb-mobile-menu-container--has-bg-gradient {
  background-image: none;
}

/*Mobile container with blur*/
.cbb-mobile-menu-container--has-blur
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(var(--cbb-blur, 10px));
}

.cbb-mobile-menu-container--has-blur::before {
  backdrop-filter: blur(0px);
}

/*Fix editor layout*/
.cbb-mobile-menu-container > .block-editor-inner-blocks {
  width: 100%;
  height: 100%;
}

/*DARK MODE*/
/*Mobile menu container with box shadow*/
html[data-theme="dark"]
  .cbb-mobile-menu-container--has-box-shadow
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout {
  box-shadow: var(--cbb-mm-dark-box-shadow, none);
}

html[data-theme="dark"] .cbb-mobile-menu-container--has-box-shadow {
  box-shadow: none;
}

/*Mobile menu container*/
html[data-theme="dark"]
  .cbb-mobile-menu-container
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout {
  background-color: var(--cbb-mm-dark-bg-color, #00000000);
}

html[data-theme="dark"] .cbb-mobile-menu-container {
  background-color: #00000000;
}

/*Mobile menu container with border*/
html[data-theme="dark"]
  .cbb-mobile-menu-container--has-border
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout {
  border-color: var(--cbb-mm-dark-border-color, "#00000000");
}

html[data-theme="dark"] .cbb-mobile-menu-container--has-border {
  border-color: "#00000000";
}

/*Mobile menu container with background image*/
html[data-theme="dark"]
  .cbb-mobile-menu-container--has-bg-gradient
  > .block-editor-inner-blocks
  > .block-editor-block-list__layout {
  background-image: var(--cbb-mm-dark-bg-gradient, none);
}

html[data-theme="dark"] .cbb-mobile-menu-container--has-bg-gradient {
  background-image: none;
}
