/* Resetowanie stylów */

/* Dodaj do stylów CSS */
#paintCanvas {
    touch-action: none;
}
/*wyłączanie zbdnych elementów pickera*/
.pcr-app .pcr-interaction {
    display:none !important;
}

.pickr{
    display: none !important;
}
.pcr-app[data-theme=nano] {
    width: 100% !important;

}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ustawienia ogólne */
body {
    font-family: 'Arial', sans-serif;
    background-color: #1e1e2f; /* Ciemny, technologiczny kolor */
    color: #ffffff; /* Biały tekst */
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Nagłówek */
h1.main-header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(90deg, #4a4ae6, #8b58e6);
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* Układ główny */
.main-layout {
    display: flex;
    overflow: hidden;
}

img{
    margin: 10%;
}

/* Panel boczny (przybornik) */
.sidebar {
    width: 25%;
    height:100vh;
    background-color: #29293d;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 2px solid #444457;
}

/* Tytuły sekcji w przyborniku */
.sidebar h2 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #c1c1ff; /* Jasny akcent */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Kolor picker */
#colorPicker {
    border: 2px solid #444457;
    border-radius: 10px;
    overflow: hidden;
}

/* Slider grubości */
#thicknessSlider {
    width: 100%;
    appearance: none;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(to right, #4a4ae6, #8b58e6);
    outline: none;
    transition: opacity 0.2s;
}

#thicknessSlider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
}

#thicknessValue {
    font-size: 16px;
    margin-top: 5px;
    color: #ffffff;
    text-align: center;
}

/* Paleta narzędzi */
.tool-palette {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0px;
    justify-items: center;
}

.pcr-app[data-theme=nano] .pcr-selection .pcr-color-chooser, .pcr-app[data-theme=nano] .pcr-selection .pcr-color-opacity {
    height: 2em !important;
    margin: 0 .6em;
}

.tool-button {
    display: flex; /* Ustawienie Flexbox, aby wycentrować zawartość */
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: 5px;
    width: 60px; /* Stała szerokość dla łatwiejszego klikania */
    height: 60px; /* Stała wysokość dla łatwiejszego klikania */
    background-color: #f4f4f4;
    border: 2px solid #ccc;
    border-radius: 8px; /* Zaokrąglenie narożników */
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.tool-button:hover {
    background-color: #e4e4e4; /* Jasnoszary przy najechaniu */
    transform: scale(1.1); /* Powiększenie przycisku */
}

.tool-button.active {
    background-color: #007bff; /* Niebieskie tło dla aktywnego przycisku */
    color: white; /* Biały kolor tekstu/ikony */
    transform: scale(1.2); /* Dodatkowe powiększenie dla aktywnego narzędzia */
    border-color: #0056b3; /* Ciemnoniebieska ramka */
}

.tool-button i {
    pointer-events: none; /* Umożliwia kliknięcie całego przycisku, nie tylko ikony */
    font-size: 24px; /* Powiększenie ikony */
}

/* Przyciski (Generuj i Wyczyść) */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#generateBtn,
#clearBtn {
    padding: 12px 20px;
    font-size: 18px;
    border: none;
    background: linear-gradient(to right, #4a4ae6, #8b58e6);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#generateBtn:hover,
#clearBtn:hover {
    background-color: #3a3a5e;
}

/* Obszar canvas */
.canvas-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e1e2f;
    padding: 20px;
    aspect-ratio: 1 / 1;
    max-width: 75%;
}

canvas {
    border: 2px solid #444457;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    /*width: 90%;*/
    height: 90%;
    aspect-ratio: 1 / 1;

    border-radius: 10px;
}

#overlaySvg {
    position: absolute;
    width: 300px;
    bottom: 75px;
    right: 172px;
    pointer-events: none;
    margin: 0px;
    visibility: hidden;
}



#loadingContainer {
    display: flex; /* Użyj Flexboxa */
    flex-direction: column; /* Elementy w kolumnie */
    align-items: center; /* Wyśrodkuj elementy poziomo */
    justify-content: center; /* Wyśrodkuj elementy pionowo */
    position: fixed; /* Na środku ekranu */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000; /* Na wierzchu */
    background-color: rgba(255, 255, 255, 0.9); /* Lekko przezroczyste tło */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    gap: 10px; /* Odstęp między elementami */
    color: #000000;
}

/* Spinner */
.spinner {
    width: 100px;
    height: 100px;
    border: 15px solid rgba(0, 0, 0, 0.2);
    border-top-color: #ff0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}


.toggle-container {
    position: fixed;
    bottom: 10px;
    left: 10px;
    display: flex;
/*    justify-content: center;*/
    width: 100%;
}

.toggle {
    width: 30px;
    height: 15px;
    background: #4caf50;
    border-radius: 7.5px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle::before {
    content: "";
    width: 13px;
    height: 13px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}

.toggle.active {
    background: #4caf50;
}

.toggle.active::before {
    transform: translateX(15px);
}
/* Animacja obracania */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Styl komunikatu statusu */
#statusMsg {
    margin-top: 10px;
    font-size: 16px;
    color: #000000 !important;
}



.modal {
  display: none; /* Ukryte domyślnie */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-content {
  background-color: #fefefedd;
  margin: 15% auto; /* Wyśrodkowanie pionowe */
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  border-radius: 5px;
  text-align: center;
}

.modal-buttons {
  margin-top: 20px;
}

.modal-buttons button {
  padding: 10px 20px;
  margin: 0 10px;
  border: none;
  border-radius: 3px;
  background-color: #4a4ae6;
  color: white;
  cursor: pointer;
  font-size: 14px;
}

.modal-buttons button:hover {
  background-color: #3a3ad6;
}
#customConfirmMessage{
    color:#525252
}






/* Responsywność */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #444457;
    }

    .canvas-container {
        flex-grow: 1;
        padding: 10px;
        
        
    }

    canvas {
        max-width: 100%;
        max-height: 100%;
    }
}