/* =========================================================
   FREEVEXA — IMAGE RESIZER
   ========================================================= */


/* =========================================================
   IMPORTANT PAGE SCROLL FIX
   ========================================================= */

html,
body {
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
}


/* =========================================================
   PAGE
   ========================================================= */

.image-resizer-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 125px 20px 90px;
    box-sizing: border-box;
}


.image-resizer-container {
    width: min(980px, 100%);
    margin: 0 auto;
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.resizer-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 28px;

    color: #666d79;
    font-size: 12px;
}


.resizer-breadcrumb a {
    color: #8b92a0;
    text-decoration: none;
    transition: .2s ease;
}


.resizer-breadcrumb a:hover {
    color: #00f0ff;
}


.resizer-breadcrumb span:last-child {
    color: #454b56;
}


/* =========================================================
   HERO
   ========================================================= */

.resizer-hero {
    text-align: center;
    margin-bottom: 42px;
}


.resizer-icon {
    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    margin: 0 auto 18px;

    border: 1px solid rgba(0, 240, 255, .2);
    border-radius: 18px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #7000ff,
            #00b7ff
        );

    box-shadow:
        0 15px 45px rgba(112, 0, 255, .18);

    font-size: 27px;
    font-weight: 700;
}


.resizer-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #00f0ff;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 2px;
    text-transform: uppercase;
}


.resizer-label::before {
    content: "";

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #00f0ff;

    box-shadow:
        0 0 14px #00f0ff;
}


.resizer-hero h1 {
    margin: 13px 0 0;

    color: #ffffff;

    font-family:
        "Space Grotesk",
        system-ui,
        sans-serif;

    font-size: clamp(42px, 7vw, 70px);

    line-height: 1;

    letter-spacing: -2.5px;
}


.resizer-hero p {
    max-width: 650px;

    margin: 18px auto 0;

    color: #9298a5;

    font-size: 17px;
    line-height: 1.7;
}


.resizer-privacy {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: 18px;

    color: #737a87;

    font-size: 11px;
}


/* =========================================================
   MAIN CARD
   ========================================================= */

.resizer-card {
    position: relative;

    width: 100%;

    padding: 24px;

    box-sizing: border-box;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, .11);

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(20, 27, 45, .82),
            rgba(8, 10, 17, .72)
        );

    box-shadow:
        0 30px 100px rgba(0, 0, 0, .35);

    backdrop-filter: blur(24px);
}


.resizer-card::before {
    content: "";

    position: absolute;

    width: 330px;
    height: 330px;

    top: -210px;
    right: -100px;

    border-radius: 50%;

    background: rgba(112, 0, 255, .12);

    filter: blur(75px);

    pointer-events: none;
}


/* =========================================================
   UPLOAD
   ========================================================= */

.resizer-upload {
    position: relative;
    z-index: 1;

    min-height: 285px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 35px;

    box-sizing: border-box;

    border: 1px dashed rgba(255, 255, 255, .18);

    border-radius: 22px;

    background: rgba(255, 255, 255, .018);

    cursor: pointer;

    transition: .25s ease;
}


.resizer-upload:hover,
.resizer-upload.dragging {
    border-color: #00f0ff;

    background: rgba(0, 240, 255, .035);

    box-shadow:
        inset 0 0 40px rgba(0, 240, 255, .025),
        0 0 35px rgba(0, 240, 255, .05);
}


.resizer-upload-icon {
    width: 76px;
    height: 76px;

    display: grid;
    place-items: center;

    margin-bottom: 20px;

    border-radius: 22px;

    font-size: 34px;

    background:
        linear-gradient(
            135deg,
            #7000ff,
            #00b7ff
        );

    box-shadow:
        0 15px 45px rgba(112, 0, 255, .2);
}


.resizer-upload h2 {
    margin: 0 0 8px;

    color: #ffffff;

    font-family:
        "Space Grotesk",
        system-ui,
        sans-serif;

    font-size: 23px;
}


.resizer-upload p {
    margin: 0;

    color: #8d94a1;

    font-size: 14px;
}


.resizer-upload > span {
    margin-top: 14px;

    color: #666d79;

    font-size: 10px;

    letter-spacing: 2px;
}


/* =========================================================
   WORKSPACE
   ========================================================= */

.resizer-workspace {
    position: relative;
    z-index: 1;

    margin-top: 4px;
}


.resizer-workspace[hidden] {
    display: none !important;
}


/* =========================================================
   WORKSPACE TOP
   ========================================================= */

.resizer-workspace-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}


.resizer-small-label {
    display: block;

    color: #858c98;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 1.7px;

    text-transform: uppercase;
}


.resizer-workspace-top h2 {
    margin: 7px 0 0;

    max-width: 550px;

    overflow: hidden;

    color: #ffffff;

    font-size: 17px;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.resizer-change-btn {
    flex-shrink: 0;

    min-height: 42px;

    padding: 0 16px;

    border: 1px solid rgba(255, 255, 255, .1);

    border-radius: 12px;

    background: rgba(255, 255, 255, .025);

    color: #a1a7b2;

    font-size: 12px;

    cursor: pointer;

    transition: .2s ease;
}


.resizer-change-btn:hover {
    border-color: #00f0ff;
    color: #00f0ff;
}


/* =========================================================
   PREVIEW
   ========================================================= */

.resizer-preview-section {
    display: grid;

    grid-template-columns: 1fr 180px;

    gap: 15px;

    margin-bottom: 18px;
}


.resizer-preview {
    min-height: 300px;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 20px;

    box-sizing: border-box;

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 20px;

    background:
        repeating-conic-gradient(
            rgba(255, 255, 255, .025) 0% 25%,
            transparent 0% 50%
        ) 50% / 24px 24px;

    overflow: hidden;
}


.resizer-preview img {
    display: block;

    max-width: 100%;
    max-height: 420px;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 8px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .35);
}


.resizer-image-info {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


.image-info-item {
    padding: 18px;

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 16px;

    background: rgba(255, 255, 255, .018);
}


.image-info-item span {
    display: block;

    margin-bottom: 8px;

    color: #777f8c;

    font-size: 10px;

    letter-spacing: 1px;

    text-transform: uppercase;
}


.image-info-item strong {
    color: #ffffff;

    font-size: 15px;
}


/* =========================================================
   SETTINGS
   ========================================================= */

.resizer-settings {
    padding: 22px;

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 20px;

    background: rgba(255, 255, 255, .018);
}


.resizer-settings-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 20px;
}


.resizer-settings-heading > span:last-child {
    color: #555c68;

    font-size: 11px;
}


/* =========================================================
   DIMENSIONS
   ========================================================= */

.dimension-row {
    display: grid;

    grid-template-columns: 1fr 25px 1fr 48px;

    align-items: end;

    gap: 12px;
}


.dimension-field label {
    display: block;

    margin-bottom: 8px;

    color: #858c98;

    font-size: 11px;

    font-weight: 600;
}


.dimension-input-wrap {
    position: relative;
}


.dimension-input-wrap input {
    width: 100%;

    height: 52px;

    box-sizing: border-box;

    padding: 0 48px 0 15px;

    border: 1px solid rgba(255, 255, 255, .1);

    border-radius: 13px;

    outline: none;

    background: rgba(0, 0, 0, .18);

    color: #ffffff;

    font-family: inherit;

    font-size: 15px;

    transition: .2s ease;
}


.dimension-input-wrap input:focus {
    border-color: #00f0ff;

    box-shadow:
        0 0 0 3px rgba(0, 240, 255, .06);
}


.dimension-input-wrap span {
    position: absolute;

    top: 50%;
    right: 14px;

    transform: translateY(-50%);

    color: #626a77;

    font-size: 11px;
}


.dimension-symbol {
    height: 52px;

    display: grid;

    place-items: center;

    color: #626a77;

    font-size: 18px;
}


.aspect-lock {
    width: 48px;
    height: 52px;

    border: 1px solid rgba(255, 255, 255, .1);

    border-radius: 13px;

    background: rgba(255, 255, 255, .025);

    color: #656d79;

    cursor: pointer;

    transition: .2s ease;
}


.aspect-lock.active {
    border-color: rgba(0, 240, 255, .55);

    background: rgba(0, 240, 255, .06);

    color: #00f0ff;
}


.aspect-info {
    display: flex;

    justify-content: space-between;

    gap: 15px;

    margin-top: 10px;

    color: #626a77;

    font-size: 10px;
}


.aspect-info span:first-child {
    color: #737b88;
}


/* =========================================================
   PRESETS
   ========================================================= */

.preset-section {
    margin-top: 24px;
}


.preset-section > label {
    display: block;

    margin-bottom: 10px;

    color: #858c98;

    font-size: 11px;

    font-weight: 600;
}


.preset-grid {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;
}


.preset-btn {
    min-height: 37px;

    padding: 0 12px;

    border: 1px solid rgba(255, 255, 255, .08);

    border-radius: 10px;

    background: rgba(255, 255, 255, .018);

    color: #858c98;

    font-size: 11px;

    cursor: pointer;

    transition: .2s ease;
}


.preset-btn:hover {
    border-color: #00f0ff;

    color: #00f0ff;

    background: rgba(0, 240, 255, .035);
}


/* =========================================================
   OUTPUT SETTINGS
   ========================================================= */

.output-settings {
    display: grid;

    grid-template-columns: 180px 1fr;

    gap: 15px;

    margin-top: 22px;
}


.output-setting label {
    display: flex;

    justify-content: space-between;

    margin-bottom: 9px;

    color: #858c98;

    font-size: 11px;

    font-weight: 600;
}


.output-setting select {
    width: 100%;

    height: 48px;

    padding: 0 13px;

    border: 1px solid rgba(255, 255, 255, .1);

    border-radius: 12px;

    outline: none;

    background: #111620;

    color: #ffffff;

    font-family: inherit;

    font-size: 12px;

    cursor: pointer;
}


.output-setting select:focus {
    border-color: #00f0ff;
}


.quality-setting input[type="range"] {
    width: 100%;

    height: 48px;

    margin: 0;

    cursor: pointer;

    accent-color: #00f0ff;
}


.quality-setting strong {
    color: #00f0ff;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.resizer-actions {
    display: grid;

    grid-template-columns: 130px 1fr;

    gap: 12px;

    margin-top: 20px;
}


.resizer-clear-btn {
    min-height: 56px;

    border: 1px solid rgba(255, 255, 255, .1);

    border-radius: 15px;

    background: rgba(255, 255, 255, .025);

    color: #858c98;

    font-size: 13px;

    cursor: pointer;

    transition: .2s ease;
}


.resizer-clear-btn:hover {
    border-color: #ff5570;

    color: #ff5570;
}


.resizer-main-btn {
    min-height: 56px;

    border: 0;

    border-radius: 15px;

    color: #ffffff;

    background:
        linear-gradient(
            100deg,
            #7000ff,
            #4255ff,
            #00b7ff
        );

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 15px 35px rgba(65, 50, 255, .14);

    transition: .25s ease;
}


.resizer-main-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 20px 45px rgba(65, 50, 255, .22);
}


.resizer-main-btn span {
    margin-right: 6px;
}


/* =========================================================
   PROGRESS
   ========================================================= */

.resizer-progress {
    margin-top: 18px;
}


.resizer-progress[hidden] {
    display: none !important;
}


.resizer-progress-bar {
    width: 100%;
    height: 7px;

    overflow: hidden;

    border-radius: 20px;

    background: rgba(255, 255, 255, .07);
}


.resizer-progress-bar span {
    display: block;

    width: 0;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #7000ff,
            #00f0ff
        );

    transition: width .25s ease;
}


.resizer-progress p {
    margin: 9px 0 0;

    color: #777f8c;

    font-size: 11px;

    text-align: center;
}


/* =========================================================
   RESULT
   ========================================================= */

.resizer-result {
    margin-top: 20px;

    padding: 21px;

    border: 1px solid rgba(0, 240, 255, .2);

    border-radius: 20px;

    background: rgba(0, 240, 255, .025);
}


.resizer-result[hidden] {
    display: none !important;
}


.result-heading {
    display: flex;

    align-items: center;

    gap: 9px;

    margin-bottom: 15px;

    color: #ffffff;

    font-size: 14px;

    font-weight: 700;
}


.result-heading > span {
    color: #00f0ff;
}


.result-stats {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 10px;
}


.result-stat {
    padding: 16px;

    border-radius: 14px;

    background: rgba(255, 255, 255, .035);
}


.result-stat span {
    display: block;

    margin-bottom: 7px;

    color: #777f8c;

    font-size: 10px;
}


.result-stat strong {
    color: #ffffff;

    font-size: 16px;
}


.resizer-download-btn {
    width: 100%;

    min-height: 52px;

    margin-top: 14px;

    border: 0;

    border-radius: 14px;

    background: #ffffff;

    color: #08090d;

    font-size: 13px;

    font-weight: 700;

    cursor: pointer;

    transition: .2s ease;
}


.resizer-download-btn:hover {
    transform: translateY(-1px);

    background: #f0f0f0;
}


/* =========================================================
   INFO CARDS
   ========================================================= */

.resizer-info-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;

    margin-top: 55px;
}


.resizer-info-card {
    min-height: 155px;

    padding: 24px;

    box-sizing: border-box;

    border: 1px solid rgba(255, 255, 255, .09);

    border-radius: 20px;

    background: rgba(255, 255, 255, .018);

    transition: .25s ease;
}


.resizer-info-card:hover {
    transform: translateY(-3px);

    border-color: rgba(255, 255, 255, .16);
}


.resizer-info-icon {
    margin-bottom: 22px;

    font-size: 23px;
}


.resizer-info-card h3 {
    margin: 0 0 8px;

    color: #ffffff;

    font-size: 16px;
}


.resizer-info-card p {
    margin: 0;

    color: #777f8b;

    font-size: 12px;

    line-height: 1.7;
}


/* =========================================================
   LIGHT MODE
   ========================================================= */

body.light-mode .resizer-card,
body.light-mode .resizer-info-card,
body.light-mode .resizer-settings,
body.light-mode .resizer-preview,
body.light-mode .image-info-item {
    background: rgba(255, 255, 255, .72);

    border-color: rgba(0, 0, 0, .1);
}


body.light-mode .resizer-hero h1,
body.light-mode .resizer-workspace-top h2,
body.light-mode .resizer-upload h2,
body.light-mode .resizer-info-card h3,
body.light-mode .image-info-item strong,
body.light-mode .result-stat strong {
    color: #101828;
}


body.light-mode .resizer-hero p,
body.light-mode .resizer-upload p,
body.light-mode .resizer-info-card p {
    color: #667085;
}


body.light-mode .dimension-input-wrap input {
    background: rgba(255, 255, 255, .8);

    color: #101828;

    border-color: rgba(0, 0, 0, .12);
}


body.light-mode .output-setting select {
    background: #ffffff;

    color: #101828;

    border-color: rgba(0, 0, 0, .12);
}


body.light-mode .resizer-change-btn,
body.light-mode .resizer-clear-btn,
body.light-mode .preset-btn,
body.light-mode .aspect-lock {
    background: rgba(0, 0, 0, .025);

    border-color: rgba(0, 0, 0, .1);

    color: #667085;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .image-resizer-page {
        padding:
            110px
            15px
            70px;
    }


    .resizer-card {
        padding: 16px;

        border-radius: 22px;
    }


    .resizer-upload {
        min-height: 250px;

        padding: 25px 15px;
    }


    .resizer-workspace-top {
        align-items: flex-start;

        flex-direction: column;
    }


    .resizer-change-btn {
        width: 100%;
    }


    .resizer-preview-section {
        grid-template-columns: 1fr;
    }


    .resizer-preview {
        min-height: 250px;
    }


    .resizer-image-info {
        display: grid;

        grid-template-columns: 1fr 1fr;
    }


    .dimension-row {
        grid-template-columns:
            1fr
            20px
            1fr
            45px;
    }


    .output-settings {
        grid-template-columns: 1fr;
    }


    .resizer-actions {
        grid-template-columns: 1fr;
    }


    .resizer-info-grid {
        grid-template-columns: 1fr;

        margin-top: 35px;
    }


    .result-stats {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 480px) {

    .resizer-hero h1 {
        letter-spacing: -1.5px;
    }


    .resizer-hero p {
        font-size: 14px;
    }


    .resizer-settings {
        padding: 16px;
    }


    .resizer-settings-heading {
        align-items: flex-start;

        flex-direction: column;
    }


    .dimension-row {
        grid-template-columns: 1fr 1fr;
    }


    .dimension-symbol {
        display: none;
    }


    .aspect-lock {
        grid-column: 1 / -1;

        width: 100%;
    }


    .resizer-image-info {
        grid-template-columns: 1fr;
    }


    .preset-grid {
        display: grid;

        grid-template-columns: 1fr 1fr;
    }


    .preset-btn {
        width: 100%;
    }

}
