/* =====================================================
   FREEVEXA — IMAGE CROPPER
===================================================== */

.cropper-page {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding: 125px 0 90px;
}


/* =====================================================
   BREADCRUMB
===================================================== */

.cropper-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 38px;
    color: #666d79;
    font-size: 11px;
}

.cropper-breadcrumb a {
    color: #9ca3af;
    text-decoration: none;
}

.cropper-breadcrumb a:hover {
    color: #00f0ff;
}


/* =====================================================
   HEADER
===================================================== */

.cropper-header {
    text-align: center;
    margin-bottom: 45px;
}

.cropper-tool-icon {
    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    margin: 0 auto 18px;

    border-radius: 17px;

    color: white;

    font-size: 27px;

    background:
        linear-gradient(
            135deg,
            #7000ff,
            #00b7ff
        );

    box-shadow:
        0 15px 40px rgba(112, 0, 255, .18);
}

.cropper-label {
    display: inline-block;

    margin-bottom: 13px;

    color: #00f0ff;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 2px;
}

.cropper-header h1 {
    margin: 0;

    font-family: "Space Grotesk", sans-serif;

    font-size: clamp(42px, 7vw, 70px);

    line-height: 1;

    letter-spacing: -2.5px;
}

.cropper-header p {
    max-width: 650px;

    margin: 19px auto 0;

    color: #858c98;

    font-size: 16px;

    line-height: 1.7;
}

.cropper-privacy {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 7px;

    margin-top: 17px;

    color: #656c78;

    font-size: 11px;
}


/* =====================================================
   MAIN CARD
===================================================== */

.cropper-card {
    position: relative;

    overflow: hidden;

    padding: 25px;

    border:
        1px solid rgba(255,255,255,.09);

    border-radius: 27px;

    background:
        linear-gradient(
            145deg,
            rgba(20,27,45,.82),
            rgba(8,10,17,.76)
        );

    box-shadow:
        0 30px 100px rgba(0,0,0,.3);

    backdrop-filter: blur(25px);
}

.cropper-card::before {
    content: "";

    position: absolute;

    width: 330px;
    height: 330px;

    top: -200px;
    right: -120px;

    border-radius: 50%;

    background:
        rgba(112,0,255,.11);

    filter: blur(75px);

    pointer-events: none;
}


/* =====================================================
   UPLOAD
===================================================== */

.crop-upload {
    min-height: 300px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 35px;

    border:
        1px dashed rgba(255,255,255,.16);

    border-radius: 22px;

    background:
        rgba(255,255,255,.018);

    cursor: pointer;

    transition:
        .25s ease;
}

.crop-upload:hover,
.crop-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);
}

.crop-upload-icon {
    width: 75px;
    height: 75px;

    display: grid;
    place-items: center;

    margin-bottom: 20px;

    border-radius: 21px;

    color: white;

    font-size: 34px;

    background:
        linear-gradient(
            135deg,
            #7000ff,
            #00b7ff
        );

    box-shadow:
        0 15px 45px rgba(112,0,255,.2);
}

.crop-upload h2 {
    margin: 0 0 8px;

    font-family: "Space Grotesk", sans-serif;

    font-size: 22px;
}

.crop-upload p {
    margin: 0;

    color: #858c98;

    font-size: 14px;
}

.crop-upload > span {
    margin-top: 14px;

    color: #555c68;

    font-size: 9px;

    letter-spacing: 2px;
}


/* =====================================================
   WORKSPACE
===================================================== */

.crop-workspace {
    width: 100%;
}

.crop-workspace-top {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.crop-small-label {
    display: block;

    margin-bottom: 6px;

    color: #737b88;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1.7px;
}

.crop-workspace-top h2 {
    margin: 0;

    font-family: "Space Grotesk", sans-serif;

    font-size: 21px;
}

.crop-change-btn {
    min-height: 42px;

    padding: 0 17px;

    border:
        1px solid rgba(255,255,255,.1);

    border-radius: 12px;

    color: #a5abb5;

    background:
        rgba(255,255,255,.025);

    cursor: pointer;

    transition: .2s ease;
}

.crop-change-btn:hover {
    color: white;

    border-color:
        rgba(0,240,255,.4);
}


/* =====================================================
   EDITOR
===================================================== */

.crop-editor {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 450px;

    padding: 25px;

    overflow: hidden;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 20px;

    background:
        repeating-conic-gradient(
            #12151d 0% 25%,
            #0d1017 0% 50%
        )
        50% / 24px 24px;
}

.crop-canvas-wrap {
    position: relative;

    display: inline-block;

    max-width: 100%;
    max-height: 410px;

    line-height: 0;

    box-shadow:
        0 20px 55px rgba(0,0,0,.45);
}

#cropCanvas {
    display: block;

    max-width: 100%;
    max-height: 410px;

    width: auto;
    height: auto;
}

.crop-selection {
    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 100%;

    border:
        2px solid #00f0ff;

    box-shadow:
        0 0 0 9999px rgba(0,0,0,.5);

    cursor: move;

    box-sizing: border-box;
}

.crop-selection.hidden {
    display: none;
}

.crop-handle {
    position: absolute;

    width: 12px;
    height: 12px;

    border-radius: 3px;

    background: white;

    border:
        2px solid #00f0ff;

    box-shadow:
        0 2px 8px rgba(0,0,0,.5);
}

.handle-nw {
    left: -7px;
    top: -7px;

    cursor: nwse-resize;
}

.handle-ne {
    right: -7px;
    top: -7px;

    cursor: nesw-resize;
}

.handle-sw {
    left: -7px;
    bottom: -7px;

    cursor: nesw-resize;
}

.handle-se {
    right: -7px;
    bottom: -7px;

    cursor: nwse-resize;
}


/* =====================================================
   CROP INFO
===================================================== */

.crop-info-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 12px;

    margin-top: 15px;
}

.crop-info {
    padding: 15px;

    border:
        1px solid rgba(255,255,255,.07);

    border-radius: 14px;

    background:
        rgba(255,255,255,.018);
}

.crop-info span {
    display: block;

    margin-bottom: 6px;

    color: #656d79;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 1.5px;
}

.crop-info strong {
    font-size: 14px;
}


/* =====================================================
   SETTINGS
===================================================== */

.crop-settings {
    margin-top: 15px;

    padding: 21px;

    border:
        1px solid rgba(255,255,255,.07);

    border-radius: 19px;

    background:
        rgba(255,255,255,.018);
}

.crop-settings-heading {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 17px;
}

.crop-settings-heading .crop-small-label {
    margin: 0;
}

.crop-settings-heading > span:last-child {
    color: #555d69;

    font-size: 10px;
}

.crop-settings-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 12px;
}

.crop-setting label {
    display: block;

    margin-bottom: 8px;

    color: #858c98;

    font-size: 11px;

    font-weight: 600;
}

.crop-setting select {
    width: 100%;

    height: 43px;

    padding: 0 12px;

    border:
        1px solid rgba(255,255,255,.09);

    border-radius: 11px;

    outline: none;

    color: #d7dbe2;

    background:
        #11151e;

    font-family: inherit;

    cursor: pointer;
}

.crop-setting select:focus {
    border-color: #00f0ff;
}

.quality-control {
    display: flex;

    align-items: center;

    gap: 10px;

    height: 43px;

    padding: 0 10px;

    border:
        1px solid rgba(255,255,255,.09);

    border-radius: 11px;

    background:
        #11151e;
}

.quality-control input {
    flex: 1;

    accent-color: #00f0ff;
}

.quality-control span {
    min-width: 34px;

    color: #b9c0ca;

    font-size: 10px;

    text-align: right;
}


/* =====================================================
   ACTIONS
===================================================== */

.crop-actions {
    display: grid;

    grid-template-columns:
        150px 1fr;

    gap: 12px;

    margin-top: 17px;
}

.crop-reset-btn,
.crop-download-btn {
    min-height: 54px;

    border-radius: 14px;

    font-family: inherit;

    font-weight: 700;

    cursor: pointer;

    transition: .22s ease;
}

.crop-reset-btn {
    border:
        1px solid rgba(255,255,255,.09);

    color: #858c98;

    background:
        rgba(255,255,255,.025);
}

.crop-reset-btn:hover {
    color: white;

    border-color:
        rgba(255,255,255,.2);
}

.crop-download-btn {
    border: 0;

    color: white;

    background:
        linear-gradient(
            100deg,
            #7000ff,
            #4255ff,
            #00b7ff
        );

    box-shadow:
        0 15px 35px rgba(65,50,255,.14);
}

.crop-download-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 20px 45px rgba(65,50,255,.22);
}

.crop-download-btn span {
    margin-right: 7px;

    font-size: 18px;
}


/* =====================================================
   PROGRESS
===================================================== */

.crop-progress {
    margin-top: 18px;
}

.crop-progress-bar {
    height: 6px;

    overflow: hidden;

    border-radius: 20px;

    background:
        rgba(255,255,255,.07);
}

.crop-progress-bar span {
    display: block;

    width: 0;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #7000ff,
            #00f0ff
        );

    transition: width .25s ease;
}

.crop-progress p {
    margin: 9px 0 0;

    color: #777f8c;

    font-size: 11px;

    text-align: center;
}


/* =====================================================
   INFO CARDS
===================================================== */

.crop-info-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 14px;

    margin-top: 55px;
}

.crop-info-card {
    min-height: 155px;

    padding: 24px;

    border:
        1px solid rgba(255,255,255,.08);

    border-radius: 19px;

    background:
        rgba(255,255,255,.018);

    transition: .25s ease;
}

.crop-info-card:hover {
    transform: translateY(-3px);

    border-color:
        rgba(255,255,255,.16);
}

.crop-feature-icon {
    margin-bottom: 21px;

    font-size: 23px;
}

.crop-info-card h3 {
    margin: 0 0 8px;

    font-size: 15px;
}

.crop-info-card p {
    margin: 0;

    color: #707784;

    font-size: 11px;

    line-height: 1.7;
}


/* =====================================================
   LIGHT MODE
===================================================== */

body.light-mode .cropper-card,
body.light-mode .crop-info-card,
body.light-mode .crop-settings,
body.light-mode .crop-info {
    border-color: rgba(0,0,0,.09);

    background:
        rgba(255,255,255,.72);
}

body.light-mode .crop-upload {
    border-color: rgba(0,0,0,.17);

    background:
        rgba(255,255,255,.45);
}

body.light-mode .crop-editor {
    background:
        repeating-conic-gradient(
            #e8e9ec 0% 25%,
            #f5f5f6 0% 50%
        )
        50% / 24px 24px;
}

body.light-mode .crop-header h1,
body.light-mode .cropper-header h1,
body.light-mode .crop-upload h2,
body.light-mode .crop-workspace-top h2,
body.light-mode .crop-info-card h3 {
    color: #101828;
}

body.light-mode .crop-setting select,
body.light-mode .quality-control {
    color: #344054;

    background: #ffffff;

    border-color:
        rgba(0,0,0,.1);
}

body.light-mode .crop-reset-btn,
body.light-mode .crop-change-btn {
    color: #667085;

    border-color:
        rgba(0,0,0,.1);

    background:
        rgba(0,0,0,.025);
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 850px) {

    .crop-settings-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .crop-editor {
        min-height: 380px;
    }

    #cropCanvas {
        max-height: 350px;
    }

}


@media (max-width: 650px) {

    .cropper-page {
        width: min(100% - 28px, 1100px);

        padding-top: 110px;
    }

    .cropper-card {
        padding: 16px;
    }

    .crop-upload {
        min-height: 260px;

        padding: 25px 15px;
    }

    .crop-workspace-top {
        align-items: flex-start;

        flex-direction: column;
    }

    .crop-change-btn {
        width: 100%;
    }

    .crop-editor {
        min-height: 300px;

        padding: 12px;
    }

    #cropCanvas {
        max-height: 280px;
    }

    .crop-settings-grid {
        grid-template-columns: 1fr;
    }

    .crop-actions {
        grid-template-columns: 1fr;
    }

    .crop-info-grid {
        grid-template-columns: 1fr;

        margin-top: 35px;
    }

}


@media (max-width: 430px) {

    .cropper-header h1 {
        letter-spacing: -1px;
    }

    .crop-info-row {
        grid-template-columns: 1fr;
    }

    .crop-settings {
        padding: 16px;
    }

}
