/* $VER=122*/

/* === GLOBAL === */ 
body {
	--bg-color: rgba(112, 6, 212, 0.877); /* dynamiczny kolor */
    background-color: var(--bg-color);
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(255, 255, 255, 0.2));
    background-blend-mode: overlay;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: 100% 100vh;
    touch-action: manipulation;
    color: #e5e7eb;
    margin: 0;
    padding: 0.5rem;
    min-height: 100vh;
}

.main-container {
    border: 2px solid black;
	border-radius: 5px;
    background: 
        linear-gradient(rgba(50, 50, 50, 0.2), rgba(50, 50, 50, 0.2)),
        url('https://groovebox.pl/imgup_m/pic/tilebg.png') repeat;
    background-size: 100px 100px; /* Dokładny rozmiar kafla */
    padding: 10px;
    width: fit-content;
    height: auto;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    color: white;
    min-height: 300px; /* Minimalna wysokość aby zobaczyć efekt */
}


#canvas { 
    width: 500px !important; 
    height: 500px !important; 
    border: 1px solid #000;
	margin-bottom: 5px; 
	-webkit-box-shadow: 0px 0px 6px 2px rgba(66, 68, 90, 1);
	-moz-box-shadow: 0px 0px 6px 2px rgba(66, 68, 90, 1);
	box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, 1);
}

#preview { max-width: 100%; display: block; margin: 20px auto; }
.crop-rect { position: absolute; border: 2px dashed red; pointer-events: none; }
	  

/* === FORMULARZE: input, button, select === */
input:not([type="checkbox"]):not(#urlInput),
button {
    background-color: #2d2d2d;
    color: #000;
    border: 2px solid #4b4b4b;
    padding: 0.5rem;
    border-radius: 0.375rem;
    height: 2.5rem;
    box-sizing: border-box;
}
input:focus,
select:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow: none;
}

/* === hide system sliders === */

input[type="range"].hidden-range {
    display: none;
}

/* === classic button  === */
.def_Button {
    box-shadow: 0px 2px 3px 0px #000000;
    background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%);
    background-color: #eae0c2;
    border-radius: 4px;
    border: 1px solid #333029;
    display: inline-block;
    cursor: pointer;
    color: #616161;
    font-family: Verdana, sans-serif;
    font-size: 15px;
    font-weight: bold;
    padding: 0.1rem 0.5rem;
    text-align: center;
    text-decoration: none;
    text-shadow: 1px 2px 5px #ffffff;
    width: 158px;
    height: 30px;
    box-sizing: border-box;
    user-select: none;
    transition: filter 0.2s ease;
	}
.def_Button:hover { filter: brightness(1.2); }
.def_Button:active { position: relative; top: 1px; }
.def_btn--beige { background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%); color: #616161; }
.def_btn--red { background: linear-gradient(to bottom, #e6cccc 5%, #ddbeba 100%); color: #616161; }
.def_btn--blue { background: linear-gradient(to bottom, #cce1e6 5%, #bacddd 100%); color: #616161; }
.def_btn--green { background: linear-gradient(to bottom, #d0e6cc 5%, #baddba 100%); color: #616161; }

/* === classic button  === */
.def_halfButton {
    box-shadow: 0px 2px 3px 0px #000000;
    background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%);
    background-color: #eae0c2;
    border-radius: 4px;
    border: 1px solid #333029;
    display: inline-block;
    cursor: pointer;
    color: #616161;
    font-family: Verdana, sans-serif;
    font-size: 15px;
    font-weight: bold;
    padding: 0.1rem 0.5rem;
    text-align: center;
    text-decoration: none;
    text-shadow: 1px 2px 5px #ffffff;
    width: 76px;
    height: 30px;
    box-sizing: border-box;
    user-select: none;
    transition: filter 0.2s ease;
	}
.def_halfButton:hover { filter: brightness(1.2); }
.def_halfButton:active { position: relative; top: 1px; }
.def_halfBtn--beige { background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%); color: #616161; }
.def_halfBtn--red { background: linear-gradient(to bottom, #e6cccc 5%, #ddbeba 100%); color: #616161; }
.def_halfBtn--blue { background: linear-gradient(to bottom, #cce1e6 5%, #bacddd 100%); color: #616161; }
.def_halfBtn--green { background: linear-gradient(to bottom, #d0e6cc 5%, #baddba 100%); color: #616161; }


/* === flat button === */
.def_buttonFlat {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 0.8rem;
	width: 160px;
    height: 30px;
    box-sizing: border-box;
    border-radius: 4px;
    border: 1px solid #333029;
    cursor: pointer;
    font-family: Verdana;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 1px 2px 5px #ffffff;
    user-select: none;
    transition: filter 0.2s ease;
	}
.def_buttonFlat:hover { filter: brightness(1.2); }
.def_buttonFlat:active { position: relative; top: 1px; } 
.def_buttonFlat--beige { background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%); color: #616161; }
.def_buttonFlat--red { background: linear-gradient(to bottom, #e6cccc 5%, #ddbeba 100%); color: #616161; }
.def_buttonFlat--blue { background: linear-gradient(to bottom, #cce1e6 5%, #bacddd 100%); color: #616161; }
.def_buttonFlat--green { background: linear-gradient(to bottom, #d0e6cc 5%, #baddba 100%); color: #616161; }


/* === flat button small === */
.def_ButtonSmall {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 30px;
    padding: 0;
    box-sizing: border-box;
    border: 1px solid #333029;
    border-radius: 4px;
    color: #000;
    font-family: Verdana;
    font-size: 9px;
    font-weight: bold;
    text-decoration: none;
    text-shadow: 1px 2px 5px #ffffff;
    cursor: pointer;
    user-select: none;
    transition: filter 0.2s ease;
	}
.def_ButtonSmall:hover { filter: brightness(1.2); }
.def_ButtonSmall:active { position: relative; top: 1px; }
.def_ButtonSmall--beige { background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%); color: #616161; }
.def_ButtonSmall--red { background: linear-gradient(to bottom, #e6cccc 5%, #ddbeba 100%); color: #616161; }
.def_ButtonSmall--blue { background: linear-gradient(to bottom, #cce1e6 5%, #bacddd 100%); color: #616161; }
.def_ButtonSmall--green { background: linear-gradient(to bottom, #d0e6cc 5%, #baddba 100%); color: #616161; }


/* === font drop-down menu === */
.def_FontSelect {
    background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%);
    background-color: #eae0c2;
    border-radius: 4px;
    border: 1px solid #333029;
    display: inline-block;
    cursor: pointer;
    color: #616161;
    font-family: Verdana, sans-serif;
    font-size: 15px;
    font-weight: bold;
    padding: 0.1rem 0.5rem;
    text-decoration: none;
    text-shadow: 1px 2px 5px #ffffff;
    width: 160px;
    height: 30px;
    text-align: center;
    box-sizing: border-box;
    user-select: none;
    transition: filter 0.2s ease;
    -webkit-appearance: none; /* ukryj domyślny wygląd */
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D'10'%20height%3D'6'%20viewBox%3D'0%200%2010%206'%20fill%3D'none'%20xmlns%3D'http%3A//www.w3.org/2000/svg'%3E%3Cpath%20d%3D'M1%201L5%205L9%201'%20stroke%3D'%23616161'%20stroke-width%3D'1.5'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
	}
.def_FontSelect:hover { filter: brightness(1.2);}
.def_FontSelect option {
	background-color: #eae0c2; /* kolor tła opcji */
    color: #D11; /* kolor tekstu */
	font-weight: bold;
	}


/* === color picker ===*/
.def_ButtonColorBox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%);
    border: 1px solid #333029;
    border-radius: 4px;
    width: 160px;
    height: 30px;
    font-family: Verdana, sans-serif;
    font-size: 15px;
    font-weight: bold;
    color: #616161;
    padding: 0 0.5rem;
    box-sizing: border-box;
    cursor: pointer;
    user-select: none;
    transition: filter 0.2s ease;
	}
.def_ButtonColorBox input[type="color"] {
    -webkit-appearance: none;
    background: none !important;
	border: none !important;
    width: 30px;
    height: 30px !important;
    padding: 0;
    cursor: pointer;
	}
.def_ButtonColorBox:hover { filter: brightness(1.2); }
.def_ButtonColorBox input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.def_ButtonColorBox input[type="color"]::-webkit-color-swatch { border: 1px solid #333029; border-radius: 1px; }

/* === GALLERY 1 === */
.container {
    max-width: 32rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
}
.flex-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: space-between;
}

.tool-container {
    border: 2px solid black;
	border-radius: 5px;
    padding: 2px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
	margin-bottom:5px;
}


/* === Less / More - toggle === */

#toggleAdvanced {
  position: relative;
  padding-right: 24px;
  background-repeat: no-repeat, no-repeat;
  background-position: right 8px center, left top;
  background-size: 10px 6px, 100% 100%;
  background-image: 
    url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D'10'%20height%3D'6'%20viewBox%3D'0%200%2010%206'%20fill%3D'none'%20xmlns%3D'http%3A//www.w3.org/2000/svg'%3E%3Cpath%20d%3D'M1%201L5%205L9%201'%20stroke%3D'%23616161'%20stroke-width%3D'1.5'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'/%3E%3C/svg%3E"),
    linear-gradient(to bottom, #eae0c2, #eae0c2);
  transition: filter 0.2s ease; /* płynne przejście */
}

#toggleAdvanced:hover {
  filter: brightness(1.2);
}

/* Gdy aktywne – strzałka w górę */
#toggleAdvanced.expanded {
  background-repeat: no-repeat, no-repeat;
  background-position: right 8px center, left top;
  background-size: 10px 6px, 100% 100%;
  background-image: 
    url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D'10'%20height%3D'6'%20viewBox%3D'0%200%2010%206'%20fill%3D'none'%20xmlns%3D'http%3A//www.w3.org/2000/svg'%3E%3Cpath%20d%3D'M1%205L5%201L9%205'%20stroke%3D'%23616161'%20stroke-width%3D'1.5'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'/%3E%3C/svg%3E"),
    linear-gradient(to bottom, #eae0c2, #eae0c2);
  transition: filter 0.2s ease; /* płynne przejście */
}

#toggleAdvanced.expanded:hover {
  filter: brightness(1.2);
}


/* === flex boxes === */
.mem_box {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    width: 500px;
    margin: 0 auto;
}

.mem_row {
    display: flex;
    gap: 0;
    align-items: stretch;
    margin: 0 !important;
}

.mem_col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 0;
}

.mem_col-1 { flex: 2; padding: 0; }
.mem_col-2 { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.mem_col-3 { flex: 2; }
.mem_col-4 { flex: 1; display: flex; flex-direction: row; align-items: center; gap: 5px; padding: 0.34rem;} /* buttons ADD/REM/EXP */
.mem_col-5 { flex: 1; display: flex; flex-direction: row; align-items: center; padding: 0.34rem;  margin-bottom: 0px; }  /* Input text */
.mem_col-smallButtons { display: flex; flex-direction: row; gap: 5px; }

/* === TOGGLE === */
.advanced-hidden { display: none;}
.advanced-visible { display: block;}
.mem_col-toggle {flex: 1 1 100%; display: flex; justify-content: center;}
.mem_col-full { flex: 1 1 100%; display: flex; justify-content: center;} /* Kolumna zajmująca pełen rząd (np. 3 kolumny połączone) */







/* input text */

.def_EncoderInput {
	box-shadow: 0px 2px 3px 0px #000000;
    font-family: Verdana, sans-serif;
    padding: 0.1rem 0.5rem;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, #eae0c2 5%, #ccc2a6 100%);
    border: 1px solid #333029;
    border-radius: 4px;
    box-sizing: border-box;
    transition: filter 0.2s ease;
	color: #222; 
	font-size: 24px; 
	font-weight: bold;
}

.def_EncoderInput:focus {
    outline: none;
    filter: brightness(1.1); /* delikatne rozjaśnienie przy fokusie */
}

.def_EncoderInput {
    color: #000; /* kolor tekstu w input */
}

.def_EncoderInput::placeholder {
    color: #A96; /* osobny kolor placeholdera */
	 text-shadow: 1px 1px 3px rgba(0, 0, 0, 1);
    opacity: 1; /* wymuszenie pełnego krycia */
	 text-align: center;
}



