/* ---------------------------
 * Generator URL – główny wrapper
 * -------------------------- */

.slugify-wrapper {
    /* układ i tło */
    box-sizing: border-box;
    margin: 0 auto 2rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ---------------------------
 * Tekst i etykiety
 * -------------------------- */

.slugify-wrapper label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.slugify-wrapper .slugify-options-label {
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    font-weight: 600;
}

/* ---------------------------
 * Pola tekstowe
 * -------------------------- */

.slugify-wrapper input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--e-global-color-uicore_body);
    font-size: 0.95rem;
    line-height: 1.4;
}

.slugify-wrapper input[type="text"]:focus {
    outline: none;
    border-color: var(--e-global-color-uicore_primary, #2563eb);
    box-shadow: 0 0 0 1px var(--e-global-color-uicore_primary, #2563eb);
}

/* ---------------------------
 * Sekcje opcji
 * -------------------------- */

.slugify-wrapper .slugify-options,
.slugify-wrapper .slugify-options-numbers {
    margin-top: 0.75rem;
}

.slugify-wrapper .radio-checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.slugify-wrapper .radio-checkbox-container label {
    margin: 0;
    cursor: pointer;
    font-size: 0.95rem;
}

/* ---------------------------
 * Custom checkbox – Usuń liczby
 * -------------------------- */

.slugify-wrapper .slugify-options-numbers input[type="checkbox"] {
    /* reset wyglądu systemowego */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    box-sizing: border-box;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;

    background-color: var(--e-global-color-uicore_light, #f9fafb);
    border: 2px solid var(--e-global-color-uicore_body, #d1d5db);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.slugify-wrapper .slugify-options-numbers input[type="checkbox"]:checked {
    background-color: var(--e-global-color-uicore_primary, #2563eb);
    border-color: var(--e-global-color-uicore_primary, #2563eb);
}

.slugify-wrapper .slugify-options-numbers input[type="checkbox"]:checked::after {
    content: url('../img/check.svg'); /* ikona w /assets/img/check.svg */
    position: absolute;
    top: 12%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 14px;
    height: 14px;
}

/* ---------------------------
 * Custom radio – wybór separatora
 * -------------------------- */

.slugify-wrapper .slugify-options input[type="radio"] {
    /* reset wyglądu systemowego */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;

    box-sizing: border-box;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 0;
    padding: 0;

    background-color: var(--e-global-color-uicore_light, #f9fafb);
    border: 2px solid var(--e-global-color-uicore_body, #d1d5db);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}

.slugify-wrapper .slugify-options input[type="radio"]:focus-visible {
    outline: 2px solid var(--e-global-color-uicore_primary, #2563eb);
    outline-offset: 2px;
}

.slugify-wrapper .slugify-options input[type="radio"]::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background-color: transparent;
}

.slugify-wrapper .slugify-options input[type="radio"]:checked {
    border-color: var(--e-global-color-uicore_primary, #2563eb);
}

.slugify-wrapper .slugify-options input[type="radio"]:checked::after {
    background-color: var(--e-global-color-uicore_primary, #2563eb);
}

/* ---------------------------
 * Sekcja przycisków
 * -------------------------- */

.slugify-wrapper .slugify-buttons {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.slugify-wrapper .slugify-output {
    margin-top: 1.25rem;
}

/* przyciski – wykorzystują klasy elementora, ale wzmacniamy layout */
.slugify-wrapper .button-slugify-generate,
.slugify-wrapper .button-slugify-clear,
.slugify-wrapper .button-slugify-copy {
    min-width: 180px;
    padding-inline: 1.5rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
	cursor: pointer;
}

/* różne szerokości na desktopie */
.slugify-wrapper .button-slugify-generate {
    flex: 2 1 220px;
}

.slugify-wrapper .button-slugify-clear {
    flex: 1 1 140px;
}

.slugify-wrapper .button-slugify-copy {
    flex: 1 1 100%;
}

/* przycisk „Wyczyść” – jaśniejszy */
.slugify-wrapper #slugify-clear {
    background-color: var(--e-global-color-uicore_light, #f9fafb);
    color: var(--e-global-color-uicore_primary, #2563eb);
    border: 1px solid var(--e-global-color-uicore_primary, #2563eb);
}

.slugify-wrapper #slugify-clear:hover {
    background-color: var(--e-global-color-uicore_primary, #2563eb);
    color: #ffffff;
}

/* przycisk „Kopiuj URL” – pełna szerokość pod polem */
.slugify-wrapper .button-slugify-copy {
    margin-top: 0.5rem;
}

/* ---------------------------
 * Responsywność
 * -------------------------- */

@media (max-width: 640px) {
    .slugify-wrapper {
        padding: 1rem;
    }

    .slugify-wrapper .button-slugify-generate,
    .slugify-wrapper .button-slugify-clear {
        flex: 1 1 100%;
    }
}

/* -------------------------------------------
   Toasty – powiadomienia o kopiowaniu
   ------------------------------------------- */
.slugify-toast {
    position: relative;
    margin-top: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: 6px;

    width: 100%;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;

    color: var(--e-global-color-uicore_light);

    opacity: 0;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease;
}

/* sukces = zielony */
.slugify-toast.toast-success {
    background: #18b600;
}

/* błąd = czerwony */
.slugify-toast.toast-error {
    background: #e30000;
}

.slugify-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}