/* =====================================================
   FREEVEXA — IMAGE TO WEBP
===================================================== */

.webp-page {
    width: 100%;
    min-height: 100vh;
    padding: 120px 20px 80px;
}

.webp-container {
    width: min(1180px, 100%);
    margin: 0 auto;
}


/* =====================================================
   BREADCRUMB
===================================================== */

.webp-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 35px;
    color: var(--text-muted, #8b93a7);
    font-size: 14px;
}

.webp-breadcrumb a {
    color: var(--accent-cyan, #00f0ff);
    text-decoration: none;
}


/* =====================================================
   HEADER
===================================================== */

.webp-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 45px;
}

.webp-tool-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background:
        linear-gradient(
            135deg,
            rgba(0, 240, 255, .16),
            rgba(112, 0, 255, .16)
        );

    border: 1px solid rgba(255,255,255,.1);

    color: var(--accent-cyan, #00f0ff);

    font-size: 30px;

    box-shadow:
        0 15px 50px rgba(0,240,255,.08);
}

.webp-label {
    display: inline-block;

    margin-bottom: 12px;

    color: var(--accent-cyan, #00f0ff);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1.8px;
}

.webp-header h1 {
    margin: 0;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: clamp(38px, 5vw, 62px);

    line-height: 1.05;

    letter-spacing: -2px;
}

.webp-header p {
    max-width: 650px;

    margin: 20px auto 0;

    color: var(--text-muted, #9ca3b5);

    font-size: 17px;

    line-height: 1.7;
}

.webp-privacy {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-top: 18px;

    padding: 9px 15px;

    border-radius: 999px;

    background: rgba(255,255,255,.035);

    border: 1px solid rgba(255,255,255,.07);

    color: #aeb6c7;

    font-size: 13px;
}


/* =====================================================
   CARD
===================================================== */

.webp-card {
    position: relative;

    overflow: hidden;

    border-radius: 28px;

    background:
        rgba(15,23,42,.65);

    border: 1px solid rgba(255,255,255,.08);

    box-shadow:
        0 30px 90px rgba(0,0,0,.25);

    backdrop-filter: blur(20px);
}


/* =====================================================
   UPLOAD
===================================================== */

.webp-upload {
    min-height: 330px;

    margin: 22px;

    padding: 45px 25px;

    border: 1.5px dashed rgba(0,240,255,.25);

    border-radius: 22px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    cursor: pointer;

    transition: .25s ease;

    background:
        rgba(255,255,255,.015);
}

.webp-upload:hover,
.webp-upload.dragover {
    border-color:
        var(--accent-cyan, #00f0ff);

    background:
        rgba(0,240,255,.035);

    transform: translateY(-2px);
}

.webp-upload-icon {
    width: 70px;
    height: 70px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 20px;

    border-radius: 20px;

    background:
        rgba(0,240,255,.08);

    color:
        var(--accent-cyan, #00f0ff);

    font-size: 34px;
}

.webp-upload h2 {
    margin: 0 0 8px;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 24px;
}

.webp-upload p {
    margin: 0 0 12px;

    color:
        var(--text-muted, #8b93a7);
}

.webp-upload > span {
    color:
        #6f788c;

    font-size: 12px;

    letter-spacing: .8px;
}


/* =====================================================
   WORKSPACE
===================================================== */

.webp-workspace {
    padding: 28px;
}

.webp-workspace-top,
.webp-results-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.webp-small-label {
    display: block;

    margin-bottom: 7px;

    color:
        var(--accent-cyan, #00f0ff);

    font-size: 11px;

    font-weight: 700;

    letter-spacing: 1.6px;
}

.webp-workspace-top h2,
.webp-results-top h2 {
    margin: 0;

    font-family:
        "Space Grotesk",
        sans-serif;

    font-size: 24px;
}

.webp-add-btn,
.webp-download-all {
    border: 1px solid rgba(0,240,255,.2);

    background:
        rgba(0,240,255,.06);

    color:
        var(--accent-cyan, #00f0ff);

    padding: 11px 16px;

    border-radius: 12px;

    cursor: pointer;

    font-weight: 600;

    transition: .2s ease;
}

.webp-add-btn:hover,
.webp-download-all:hover {
    background:
        rgba(0,240,255,.12);

    transform: translateY(-1px);
}


/* =====================================================
   IMAGE LIST
===================================================== */

.webp-image-list {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(210px, 1fr));

    gap: 15px;

    margin-bottom: 28px;
}

.webp-image-item {
    position: relative;

    overflow: hidden;

    border-radius: 16px;

    border: 1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.025);
}

.webp-image-preview {
    width: 100%;

    height: 155px;

    display: block;

    object-fit: cover;

    background:
        rgba(0,0,0,.2);
}

.webp-image-info {
    padding: 12px;
}

.webp-image-name {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color: #e8ebf2;

    font-size: 13px;

    font-weight: 600;
}

.webp-image-size {
    margin-top: 5px;

    color:
        #778095;

    font-size: 11px;
}

.webp-remove {
    position: absolute;

    top: 9px;
    right: 9px;

    width: 30px;
    height: 30px;

    border: 0;

    border-radius: 50%;

    background:
        rgba(0,0,0,.65);

    color: #fff;

    cursor: pointer;

    font-size: 15px;

    backdrop-filter: blur(8px);
}


/* =====================================================
   SETTINGS
===================================================== */

.webp-settings {
    padding: 24px;

    border-radius: 20px;

    border: 1px solid rgba(255,255,255,.07);

    background:
        rgba(255,255,255,.025);

    margin-bottom: 22px;
}

.webp-settings-heading {
    margin-bottom: 22px;
}

.webp-settings-heading > div {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    color: #7e8799;

    font-size: 13px;
}

.webp-settings-grid {
    display: grid;

    grid-template-columns:
        minmax(260px, 1.5fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr);

    gap: 18px;
}

.webp-setting {
    display: flex;

    flex-direction: column;

    gap: 9px;
}

.webp-setting label {
    color: #dce1eb;

    font-size: 13px;

    font-weight: 600;
}

.webp-setting input[type="number"],
.webp-setting input[type="text"] {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid rgba(255,255,255,.09);

    background:
        rgba(0,0,0,.18);

    color: #fff;

    border-radius: 11px;

    padding: 12px;

    outline: none;
}

.webp-setting input[type="number"]:focus {
    border-color:
        var(--accent-cyan, #00f0ff);
}

.webp-range-row {
    display: flex;

    align-items: center;

    gap: 14px;
}

.webp-range-row input {
    flex: 1;

    accent-color:
        var(--accent-cyan, #00f0ff);

    cursor: pointer;
}

.webp-range-row strong {
    min-width: 45px;

    text-align: right;

    color:
        var(--accent-cyan, #00f0ff);
}

.webp-setting small {
    color: #697285;

    font-size: 11px;
}

.webp-checkbox {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-top: 20px;

    color: #aeb6c7;

    font-size: 13px;

    cursor: pointer;
}

.webp-checkbox input {
    width: 16px;
    height: 16px;

    accent-color:
        var(--accent-cyan, #00f0ff);
}


/* =====================================================
   ACTIONS
===================================================== */

.webp-actions {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    margin-top: 25px;
}

.webp-clear-btn {
    border: 1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.035);

    color: #aab2c1;

    padding: 13px 18px;

    border-radius: 12px;

    cursor: pointer;

    font-weight: 600;
}

.webp-convert-btn {
    border: 0;

    padding: 14px 24px;

    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #00f0ff,
            #7000ff
        );

    color: #fff;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 12px 30px rgba(0,240,255,.12);

    transition: .2s ease;
}

.webp-convert-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 16px 35px rgba(0,240,255,.18);
}

.webp-convert-btn:disabled {
    opacity: .5;

    cursor: not-allowed;

    transform: none;
}


/* =====================================================
   PROGRESS
===================================================== */

.webp-progress {
    margin-top: 22px;

    padding: 18px;

    border-radius: 15px;

    background:
        rgba(0,240,255,.035);

    border: 1px solid rgba(0,240,255,.08);
}

.webp-progress-bar {
    width: 100%;

    height: 7px;

    overflow: hidden;

    border-radius: 99px;

    background:
        rgba(255,255,255,.07);
}

.webp-progress-bar span {
    display: block;

    width: 0%;

    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #00f0ff,
            #7000ff
        );

    transition: width .25s ease;
}

.webp-progress p {
    margin: 10px 0 0;

    color: #8b94a7;

    font-size: 12px;
}


/* =====================================================
   RESULTS
===================================================== */

.webp-results {
    margin-top: 30px;

    padding-top: 28px;

    border-top:
        1px solid rgba(255,255,255,.07);
}

.webp-result-list {
    display: grid;

    grid-template-columns:
        repeat(auto-fill, minmax(250px, 1fr));

    gap: 16px;
}

.webp-result-item {
    overflow: hidden;

    border-radius: 17px;

    border: 1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.025);
}

.webp-result-image {
    width: 100%;

    height: 180px;

    object-fit: contain;

    display: block;

    background:
        rgba(0,0,0,.22);
}

.webp-result-content {
    padding: 14px;
}

.webp-result-name {
    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

    color: #edf0f5;

    font-size: 13px;

    font-weight: 600;
}

.webp-result-meta {
    display: flex;

    justify-content: space-between;

    gap: 10px;

    margin-top: 8px;

    color: #7d879b;

    font-size: 11px;
}

.webp-result-meta strong {
    color:
        var(--accent-cyan, #00f0ff);
}

.webp-download-one {
    width: 100%;

    margin-top: 13px;

    padding: 10px;

    border: 1px solid rgba(0,240,255,.16);

    border-radius: 10px;

    background:
        rgba(0,240,255,.05);

    color:
        var(--accent-cyan, #00f0ff);

    cursor: pointer;

    font-weight: 600;
}


/* =====================================================
   INFO
===================================================== */

.webp-info-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;

    margin-top: 25px;
}

.webp-info-card {
    padding: 25px;

    border-radius: 20px;

    border: 1px solid rgba(255,255,255,.07);

    background:
        rgba(255,255,255,.025);
}

.webp-info-icon {
    font-size: 24px;

    margin-bottom: 14px;
}

.webp-info-card h3 {
    margin: 0 0 8px;

    font-family:
        "Space Grotesk",
        sans-serif;
}

.webp-info-card p {
    margin: 0;

    color:
        #858ea1;

    font-size: 13px;

    line-height: 1.65;
}


/* =====================================================
   LIGHT MODE
===================================================== */

body.light-mode .webp-card,
body.light-mode .webp-info-card {
    background:
        rgba(255,255,255,.72);

    border-color:
        rgba(0,0,0,.08);
}

body.light-mode .webp-settings,
body.light-mode .webp-image-item,
body.light-mode .webp-result-item {
    background:
        rgba(0,0,0,.025);

    border-color:
        rgba(0,0,0,.08);
}

body.light-mode .webp-upload {
    background:
        rgba(0,0,0,.015);

    border-color:
        rgba(0,0,0,.12);
}

body.light-mode .webp-upload h2,
body.light-mode .webp-workspace-top h2,
body.light-mode .webp-results-top h2 {
    color: #161a22;
}

body.light-mode .webp-image-name,
body.light-mode .webp-result-name {
    color: #202530;
}

body.light-mode .webp-setting input[type="number"] {
    background: #fff;

    color: #222;

    border-color:
        rgba(0,0,0,.12);
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 850px) {

    .webp-settings-grid {
        grid-template-columns: 1fr 1fr;
    }

    .webp-quality-setting {
        grid-column: 1 / -1;
    }

    .webp-info-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 600px) {

    .webp-page {
        padding:
            100px 14px 50px;
    }

    .webp-workspace {
        padding: 18px;
    }

    .webp-upload {
        margin: 14px;
    }

    .webp-workspace-top,
    .webp-results-top {
        align-items: flex-start;

        flex-direction: column;
    }

    .webp-settings-grid {
        grid-template-columns: 1fr;
    }

    .webp-quality-setting {
        grid-column: auto;
    }

    .webp-actions {
        flex-direction: column-reverse;

        align-items: stretch;
    }

    .webp-clear-btn,
    .webp-convert-btn {
        width: 100%;
    }

}
