@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:ital,wght@0,400..700;1,400..700&display=swap');

:root {
 --background-selected-color: #FFF;
 --selected-color: #484848;
}

body{
  font-family: 'Instrument Sans', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Instrument Sans', sans-serif !important;
}

#sidebar h2, .material-selected-zone-name, .resumen-pool-type-label
{
  text-transform: uppercase;
}

.ui-widget-overlay
{
  background: rgba(0, 0, 0, 0.1) !important;
}

#content {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  width: 100%;
  height: 100%;
  position: relative;
  left: 0;
  top: 0;
  z-index: 0;
}

.materials-selected-container
{
  display: grid;
  grid-template-columns: 1fr 1fr;  
  /* dos columnas */

  gap: 1vw;
}

#defined-image img{max-width: 150px;}

.no-image-defined{font-size: 110%;
  font-weight: bold;
  color: red;}

/* Cabecera fija superior */
#top-header {
  height: 8vh;
  background-color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2%;
  z-index: 1000;
}

#top-header .header-logo {
  display: flex;
  align-items: center;
  height: 60%;
  margin-top: 2vh;
}

#top-header .header-logo img {
  height: 100%;
  width: auto;
}

#top-header .header-slogan {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  line-height: 1.1;
  
}

#top-header .header-slogan span {
  font-size: 1.2vh;
  font-weight: 600;
  color: var(--background-selected-color);
  letter-spacing: 0.15em;
  color: #000000;
}

#space-image {
  position: relative;
}

#content.sidebar-always-visible #space-image {
  margin-left: 18%;
  width: calc(100% - 18%);
}

.main-image{width: 100%; height: auto; display: block;}
.material-image{position: absolute; left: 0; top: 0; width: 100%; display: none; height: auto; display: block;}

.zone-selector {
  position: absolute;
  z-index: 999;
  display: flex;
  background-color: rgb(129 129 129 / 60%);
  
  border-radius: 1.5vw;
  padding: 0.4vw 0.8vw ;
  text-decoration: none;
  transition: background-color 0.3s ease;
    align-items: center;
}

.zone-selector span {
  color: #fff;
  font-size: 0.7vw;
  font-weight: 100;
  white-space: nowrap;
  text-transform: uppercase;
}

.zone-selector:hover {
  background-color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
}

.downloader-selector img, .material-selector img{height: 80%; margin-right: -4%; margin-top: 5%;}
.downloader-selector .figure-right, .material-selector .figure-right
{
  overflow: hidden;
  background: var(--background-selected-color);
  border-radius: 0% 100% 100% 0% / 30% 50% 50% 70%;
  width: 20%;
  height: 100%;
  float: right;
}

.downloader-selector .figure, .material-selector .figure
{
  overflow: hidden;
  background: var(--background-selected-color);
  
  width: 80%;
  height: 100%;
  float: left;
  text-align: right;
  padding: 6% 0;
}


.material-selector, .downloader-selector
{
  display: block;
  position: absolute;
  width: 10%;
  height: 9%;
  overflow: hidden;
  
  z-index: 23;
  /*left: 15%;*/
}

.material-selector{  top: 40%;}

.downloader-selector{ top: 49.5%;}

.ui-tooltip, .arrow:after {
  background: black !important;
  color: #FFF !important;
}


#sidebar{
  top: 8vh;
  height: calc(100% - 5vh);
  z-index: 24;
  background: #fff;
  /*box-shadow: 0 0 30px rgba(0,0,0,0.4);*/
  float: left;
  -webkit-transition: all 1s ease-in-out;
  -moz-transition: all 1s ease-in-out;
  -o-transition: all 1s ease-in-out;
  transition: all 1s ease-in-out;
  /*width: 15%;
  padding: 4% 2%;*/
  overflow: auto;
  width: 0;
}

#sidebar-content{display: none;}

.sidebar-showed{
  width: 18% !important;
  padding: 3% 1%;
}

#sidebar h2 {
  font-size: 1.1vw;
  font-weight: 700;
  position: relative;
  padding: 0;
  color: #000000;
  margin-bottom: 0;
}

#sidebar h2::after {
  display: none;
}


#sidebar h3{font-size: 1.1vw; font-weight: 700; line-height: 1.2vw;}
#sidebar p{font-size: 1vw;}
.material-zone{overflow: hidden;}

/* Selector de tipo de piscina (skimmer/desbordante) con checkboxes */
.pool-type-section {
  margin-bottom: 1vw;
}

.pool-type-section-title {
  font-size: 0.85vw;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
  margin-bottom: 0.5vw;
}

#pool-type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5vw;
}

.pool-type-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.pool-type-image-wrapper {
  width: 100%;
  border: 2px solid #e0e0e0;
  border-radius: 0.5vw;
  padding: 0.4vw;
  box-sizing: border-box;
  transition: border-color 0.3s ease, border-width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

.pool-type-image-wrapper:hover {
  border-color: #999;
}

.pool-type-image-wrapper.active {
  border-color: #000000;
  border-width: 2px;
}

.pool-type-image-wrapper img {
  width: 100%;
  max-width: 6vw;
  height: auto;
}

.pool-type-label {
  display: flex;
  align-items: center;
  gap: 0.3vw;
  margin-top: 0.3vw;
  cursor: pointer;
}

.pool-type-label input[type="checkbox"] {
  margin: 0;
  width: 1vw;
  height: 1vw;
  cursor: pointer;
}

.pool-type-label span {
  font-size: 0.7vw;
  font-weight: 500;
  color: var(--selected-color);
}

/* Estilos del acordeón de zonas */
#zones-accordion {
  margin-top: 0.5vw;
}

.zone-accordion-item {
  margin-bottom: 0.8vw;
  border: none;
  border-radius: 0;
  overflow: visible;
}

.zone-accordion-header {
  display: flex;  
  align-items: flex-start;
  padding: 0;
  padding-bottom: 0.3vw;
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease;
  border-bottom: none;
  gap: 0.2vw;
}

.zone-accordion-header:hover {
  background: transparent;
}

.zone-accordion-header .zone-header-info {
  display: flex;
  flex-direction: column;
}

.zone-accordion-header h3 {
  margin: 0;
  font-size: 0.85vw;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
}

.zone-accordion-header .zone-subtitle {
  font-size: 0.65vw;
  color: #000000;
  font-weight: 400;
  margin-top: 0.1vw;
}

.accordion-arrow {
  font-size: 0.5vw;
  color: #666;
  transition: transform 0.3s ease;
  margin-top: 0.2vw;
}

.accordion-arrow svg {
  width: 0.5vw;
  height: 0.5vw;
}

.zone-accordion-item.accordion-open .zone-accordion-header {
  background: transparent;
}

.zone-accordion-item.accordion-open .zone-accordion-header h3 {
  color: #333;
}

.zone-accordion-item.accordion-open .accordion-arrow {
  color: #666;
  transform: rotate(180deg);
}

.zone-accordion-content {
  display: none;
  padding: 0.5vw 0;
  background: #fff;
}

.materials-list {
  margin-top: 0.5vw;
  display: flex;
  flex-direction: column;
  gap: 0.4vw;
}

/* Materiales a ancho completo */
.material-value-selector {
  width: 100%;
  margin-bottom: 0;
}

.material-value-selector a {
  display: flex;
  align-items: flex-start;
  padding: 0.5vw;
  border: 2px solid #e0e0e0;
  border-radius: 0.5vw;
  text-decoration: none;
  transition: all 0.3s ease;
  background: #fff;
}

.material-value-selector a:hover {
  border-color: #000000;
  background: #f9f9f9;
}

.material-value-selector a.selected-material {
  border-color: #000000;
  border-width: 2px;
  background: #fff;
}

.material-image-container {
  width: 5vw;
  height: 5vw;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 0.4vw;
}

.material-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-info {
  flex: 1;
  margin-left: 0.6vw;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.material-collection {
  font-size: 0.7vw;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
}

.material-name {
  font-size: 0.7vw;
  font-weight: 400;
  color: #666;
  line-height: 1.3;
}

.material-size-label {
  font-size: 0.6vw;
  font-weight: 400;
  color: #888;
  line-height: 1.2;
  margin-top: 0.2vw;
}

.material-measure {
  font-size: 0.65vw;
  color: #666;
  border: 1px solid #ccc;
  display: inline-block;
  padding: 0.1vw 0.3vw;
  border-radius: 0.2vw;
  margin-top: 0.1vw;
  margin-right: auto;
}

/* Área de selector de materiales con scroll */
#material-selector-area {
  padding-right: 0.5vw;
  position: relative;
}

#material-resumen-area {
  position: relative;
  clear: both;
}

#material-selector-area::-webkit-scrollbar {
  width: 0.4vw;
}

#material-selector-area::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0.2vw;
}

#material-selector-area::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 0.2vw;
}

#material-selector-area::-webkit-scrollbar-thumb:hover {
  background: #555;
}



.ajaxloading {
	position: fixed;
	background: rgba(0, 0, 0, 0.3);
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
  display: none;
	
}
.ajaxloading .ajax_process {
  background: url("../img/loading.gif") no-repeat scroll center 20px #FFF;
  box-shadow: 0 0 5px #000;
  
  left: 50%;
  letter-spacing: 2px;
  margin: -42px 0 0 -90px;
  padding-top: 70px;
  position: absolute;
  text-align: center;
  top: 50%;
  width: 76px;
  color: #000;
}

a.selected-material{
  
    border: 1px solid #d2d2d2;
    box-sizing: border-box;
}

.file-not-assigned{position: relative;}
.file-not-assigned::before{content: "🚫"; position: absolute;}

/* Estilos del área de resumen */
/*
.resumen-container {
  border: 2px solid #000000;
  border-radius: 1vw;
  padding: 1vw;
  margin-bottom: 1vw;
}
*/

.resumen-pool-type {
  margin-bottom: 1vw;
}

.resumen-pool-type-label {
  font-size: 0.75vw;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.3vw;
}

.resumen-pool-type-image {
  border: 1px solid #e0e0e0;
  border-radius: 0.5vw;
  padding: 0.5vw;
  text-align: center;
}

.resumen-pool-type-image img {
  max-width: 100%;
  height: auto;
}

.resumen-pool-type-name {
  font-size: 0.7vw;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-top: 0.3vw;
  text-transform: uppercase;
}

.material-selected-container {
  padding: 0.8vw 0;
  overflow: hidden;
  width: 100%;
}

.material-selected-container:not(:last-child) {
  border-bottom: none;
}

.material-selected-zone-name {
  font-size: 0.8vw;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.1vw;
}

.material-selected-collection-label {
  font-size: 0.65vw;
  font-weight: 400;
  color: #000000;
  margin-bottom: 0.3vw;
}

.material-selected-image {
  width: 6vw;
  height: 6vw;
  border-radius: 0.5vw;
  overflow: hidden;
  margin-bottom: 0.3vw;
}

.material-selected-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-selected-info {
  display: flex;
  flex-direction: column;
}

.material-selected-info .collection-name {
  font-size: 0.7vw;
  font-weight: 700;
  color: #000000;
}

.material-selected-info .material-name {
  font-size: 0.7vw;
  font-weight: 400;
  color: #000000;
}

.material-selected-info .material-size {
  font-size: 0.7vw;
  font-weight: 400;
  color: #000000;
}

.material-not-selected {
  font-size: 0.7vw;
  color: #999;
  font-style: italic;
}

.material-download-button,
.sidebar-download-button {
  display: block;
  background-color: transparent;
  padding: 0.8vw;
  font-size: 1.1vw;
  text-align: center;
  margin-top: 1vw;
  color: #333;
  
  font-weight: 500;
}

.material-download-button:hover,
.sidebar-download-button:hover {
  color: #000000;
  text-decoration: underline;
}

.sidebar-download-button {
  margin-top: 1.5vw;
  padding: 0.6vw;
  font-size: 1vw;
}

.material-select-container{
  min-height: auto;
  overflow: hidden;
  margin-top: 0.5vw;
  margin-bottom: 0.8vw;
}

/* Checkboxes de colecciones en dos columnas */
.collection-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2vw;
}

.collection-checkbox-item {
  display: flex;
  align-items: center;
  padding: 0.1vw 0.1vw;  
  border-radius: 0.1vw;
  cursor: pointer;
  transition: background 0.2s ease;
  box-sizing: border-box;
  margin-bottom: 0;
}

.collection-checkbox-item:hover {
  /*background: #e8e8e8;*/
}

.collection-checkbox-item input[type="checkbox"] {
  margin: 0;
  margin-right: 0.4vw;
  width: 1vw;
  height: 1vw;
  cursor: pointer;
}

.collection-checkbox-item span {
  font-size: 0.75vw;
  color: #333;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: normal;
}

.collection-checkbox-item:has(input:checked) {
  background: var(--background-selected-color);
}

.collection-checkbox-item:has(input:checked) span {
  color: var(--selected-color);
}


/* Cuadro de dialogo y formulario **/

.ui-dialog-titlebar{
  border-bottom: none !important;
}


.ui-dialog .ui-dialog-titlebar-close {
 background: transparent;
  border: none;
  font-size: 1.5vw;
  color: #333;
  cursor: pointer;
    position: absolute;
    right: 10px;
    top: 40px;
    transform: translateY(-50%);
}

#download-button-container
{
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#download-button-container.fixed-bottom
{
  position: fixed;
  bottom: 20px;
}

#download-button-container a {
  display: block;
  padding: 0.6vw 1.2vw 0.8vw;
  line-height: 100%;
  
  font-size: 1.1vw;
  text-align: center;
  
  
  font-weight: 500;
  border-radius: 2vw;
  
  text-decoration: none;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

#download-button-container a:hover {
  text-decoration: underline;
}

#download-button-container a:not(.disabled) {
  background-color: #FFF;
  color: #333;
  border: 1px solid #333;

}

.material-download-button.disabled
{
  background-color: #e0e0e0;
  color: #999;
  text-decoration: none;
  border-color: #e0e0e0;
  cursor: default;
}


.ui-dialog{max-width: 700px;}
.intro-formulario{font-weight: 700; position: relative; padding-bottom: 1em;
  font-size: 20px;
  line-height: 22px;}

.intro-formulario::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  
  width: 6%;
  
  border-bottom: 5px solid var(--background-selected-color);;
}
#temas-legales{font-size: 90%;}

.wpcf7-text{
  
  border-bottom: 2px solid #e6e6e6 !important;
  width: 100%;
}


.wpcf7-submit{
  display: block;
  background-color: #e6e6e6;
  -webkit-border-radius: 26px;
  -moz-border-radius: 26px;
  border-radius: 26px;
  padding: 10px !important;
  font-size: 17px;
  text-align: center;
  margin-top: 20px;
  color: var(--background-selected-color);
  width: 100%;
  font-weight: 700;
  font-family: 'Instrument Sans', sans-serif;
}

#container-form{padding: 20px 40px 20px;}


/* Estilos para modo sidebar siempre visible */
#content.sidebar-always-visible #sidebar {
  width: 18% !important;
  padding: 1% 1% !important;
  z-index: 100 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#content.sidebar-always-visible #sidebar-content {
  display: flex !important;
  flex-direction: column !important;
  pointer-events: auto !important;
  height: 100%;
}

#content.sidebar-always-visible #material-selector-area {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

#content.sidebar-always-visible #material-resumen-area {
  flex-shrink: 0;
}

#content.sidebar-always-visible #sidebar * {
  pointer-events: auto;
}

#content.sidebar-always-visible #sidebar .sidebar-section {
  position: relative;
}

#content.sidebar-always-visible #sidebar .sidebar-section-header {
  cursor: pointer;
  position: relative;
  user-select: none;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5vw;
}

#content.sidebar-always-visible #sidebar .sidebar-section-content {
  position: relative;
}

/* Estilos de los encabezados de sección del sidebar */
.sidebar-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: background 0.3s ease;
  border-bottom: none;
  margin-bottom: 0.5vw;
}

.sidebar-section-header:hover {
  background: transparent;
}

.sidebar-section-header h2 {
  margin: 0;
  padding: 0;
  font-size: 1.1vw;
  font-weight: 700;
  color: #000000;
}

.sidebar-section-header h2::after {
  display: none;
}

.section-arrow {
  font-size: 1vw;
  color: #666;
  transition: transform 0.3s ease;
}

.sidebar-section.active .sidebar-section-header {
  background: transparent;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.sidebar-section.active .sidebar-section-header h2 {
  color: #000000;
}

.sidebar-section.active .section-arrow {
  color: #666;
}

.sidebar-section-content {
  padding: 0.5vw;
  border: 1px solid #000;
  border-radius: 0.5vw;
  
  
}

.zone-accordion-content
{
max-height: 46vh;
overflow-y: auto;
}

#content.sidebar-always-visible #material-resumen-area .sidebar-section-header {
  border-top: 1px solid #e0e0e0;
  margin-top: 0.5vw;
  padding-top: 0.5vw;
}

.accordion-open > .zone-accordion-header > .accordion-arrow,
.sidebar-section.active > .sidebar-section-header > .accordion-arrow {
  transform: rotate(180deg);
}

@media  (max-device-width: 1024px) and (orientation: portrait) {

	#mobile-rotation {
		display: block !important;
		height: 100%;
		width: 100%;
		position: fixed;
		left:0;
		top: 0;
		background-repeat: no-repeat;
		background-size:cover;
		z-index: 999999999;
		}

	#mobile-rotation .rotation-icon{

		height: 100%;
		width: 100%;
		position: absolute;
		left:0;
		top: 0;
		background: url(../img/rotate-screen.gif) no-repeat center center rgba(0,0,0,0.8);


	}
}

