﻿/* ==========================================================
   CLEAN URL SLUG GENERATOR
   Part 1
========================================================== */

/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2f6fb3;
    --primary-hover: #235b95;
    --border: #dcdcdc;
    --text: #222;
    --muted: #6c757d;
    --background: #f5f6f8;
    --white: #ffffff;
}

body {
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
}

/* =========================
   PAGE
========================= */

.page-wrapper {
    width: 100%;
    min-height: 100vh;
    padding: 60px 20px;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: auto;
}

/* =========================
   TITLE
========================= */

.page-title {
    text-align: center;
    font-size: 56px;
    font-weight: 300;
    color: #222;
    margin-bottom: 20px;
    line-height: 1.15;
}

.page-description {
    width: 100%;
    max-width: 760px;
    margin: auto;
    text-align: center;
    font-size: 18px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 45px;
}

/* =========================
   CARD
========================= */

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 28px;
    margin-bottom: 30px;
}

/* =========================
   CARD HEADER
========================= */

.card-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.label-title {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    letter-spacing: .4px;
}

.label-desc {
    font-size: 13px;
    color: #777;
}

/* =========================
   INPUT
========================= */

.text-input {
    width: 100%;
    height: 46px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
    transition: .25s;
    margin-bottom: 24px;
}

    .text-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(47,111,179,.12);
    }

    .text-input::placeholder {
        color: #aaa;
    }

/* =========================
   TOGGLE BUTTONS
========================= */

.separator-group {
    display: flex;
    gap: 15px;
    margin-bottom: 22px;
}

.toggle-btn {
    border: 1px solid #d7d7d7;
    background: #fff;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: .25s;
}

    .toggle-btn:hover {
        border-color: var(--primary);
    }

    .toggle-btn.active {
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
    }

/* =========================
   CHECKBOXES
========================= */

.option-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 15px;
}

    .checkbox-item input {
        width: 17px;
        height: 17px;
        accent-color: var(--primary);
    }

/* =========================
   BUTTONS
========================= */

.button-group {
    display: flex;
    gap: 14px;
}

.btn {
    border: none;
    cursor: pointer;
    border-radius: 4px;
    height: 42px;
    min-width: 120px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
    transition: .25s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--primary-hover);
    }

.btn-light {
    background: #fff;
    border: 1px solid #d6d6d6;
    color: #333;
}

    .btn-light:hover {
        background: #f3f3f3;
    }

/* =========================
   OUTPUT CARD
========================= */

.output-card {
    margin-top: 10px;
}

.output-box {
    width: 100%;
    min-height: 55px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    background: #fafafa;
    padding: 14px 15px;
    font-size: 15px;
    color: #222;
    display: flex;
    align-items: center;
    word-break: break-word;
}

.copy-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}
/* ==========================================================
   PART 2 - RESPONSIVE + UI POLISH
========================================================== */

/* =========================
   INPUT / OUTPUT STATES
========================= */

.text-input:disabled {
    background: #f8f8f8;
    cursor: not-allowed;
}

.output-box:empty::before {
    content: "Generated slug will appear here...";
    color: #9a9a9a;
}

.output-box.has-value {
    background: #ffffff;
    color: #222;
}

/* =========================
   BUTTON STATES
========================= */

.btn:focus,
.toggle-btn:focus,
.text-input:focus {
    outline: none;
}

.btn:active {
    transform: scale(.98);
}

.btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.toggle-btn {
    user-select: none;
}

    .toggle-btn.active:hover {
        background: var(--primary-hover);
        border-color: var(--primary-hover);
    }

/* =========================
   CARD ANIMATION
========================= */

.card {
    transition: box-shadow .25s ease;
}

    .card:hover {
        box-shadow: 0 6px 20px rgba(0,0,0,.06);
    }

/* =========================
   COPY SECTION
========================= */

.copy-section .btn {
    min-width: 100px;
}

/* =========================
   SPACING POLISH
========================= */

.button-group .btn:first-child {
    margin-right: 4px;
}

.option-group label:last-child {
    margin-bottom: 0;
}

/* =========================
   TABLET
========================= */

@media (max-width: 992px) {

    .page-title {
        font-size: 46px;
    }

    .page-description {
        font-size: 17px;
    }

    .card {
        padding: 24px;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .page-wrapper {
        padding: 35px 15px;
    }

    .page-title {
        font-size: 36px;
        line-height: 1.2;
    }

    .page-description {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .card {
        padding: 20px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .separator-group {
        flex-direction: column;
        gap: 10px;
    }

    .toggle-btn {
        width: 100%;
    }

    .button-group {
        flex-direction: column;
    }

        .button-group .btn {
            width: 100%;
        }

    .copy-section {
        justify-content: stretch;
    }

        .copy-section .btn {
            width: 100%;
        }
}

/* =========================
   SMALL MOBILE
========================= */

@media (max-width: 480px) {

    .page-title {
        font-size: 30px;
    }

    .page-description {
        font-size: 14px;
        line-height: 1.7;
    }

    .label-title,
    .label-desc {
        font-size: 12px;
    }

    .text-input {
        font-size: 14px;
        height: 44px;
    }

    .toggle-btn {
        font-size: 13px;
        padding: 10px 14px;
    }

    .checkbox-item {
        font-size: 14px;
    }

    .btn {
        font-size: 13px;
        height: 40px;
    }

    .output-box {
        font-size: 14px;
    }
}

/* =========================
   SELECTION
========================= */

::selection {
    background: rgba(47,111,179,.2);
}

/* =========================
   SCROLLBAR (CHROME)
========================= */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f3f3f3;
}

::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 20px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
    display: block;
    min-height: 18px;
}

.output-box.fade-in {
    animation: fadeIn .3s ease;
}

@keyframes fadeIn {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   END OF FILE
========================================================== */