/* =====================================
   ONETOOLBOX - PHOTO ENHANCER
   FINAL CSS
===================================== */


/* =====================================
   HERO
===================================== */

.tool-hero {
    padding: 40px 0 30px;
    text-align: center;
}

.tool-hero h1 {
    font-size: 40px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 10px;
}

.tool-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: #64748b;
    font-size: 17px;
    line-height: 1.6;
}


/* =====================================
   MAIN GRID
===================================== */

.enhancer-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}


/* =====================================
   CARD
===================================== */

.enhancer-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    padding: 22px;
    min-width: 0;
    min-height: 590px;

    display: flex;
    flex-direction: column;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08);
}

.enhancer-card h3 {
    text-align: center;
    color: #0f172a;
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 20px;
}

.enhancer-card h3 i {
    color: #2563eb;
    margin-right: 6px;
}


/* =====================================
   UPLOAD AREA
===================================== */

.upload-area {
    min-height: 300px;

    border: 2px dashed #2563eb;
    border-radius: 20px;

    background: #f8fbff;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 18px;

    overflow: hidden;

    transition: 0.25s;
}

.upload-area:hover {
    background: #f1f7ff;
    border-color: #1d4ed8;
}

.upload-area.dragging {
    background: #eff6ff;
    border-color: #16a34a;
}


/* =====================================
   UPLOAD ICON
===================================== */

.upload-area > i {
    font-size: 42px;
    color: #2563eb;
    margin-bottom: 6px;
}


/* =====================================
   ORIGINAL PREVIEW
===================================== */

#originalPreview {
    display: none;

    width: 90%;
    height: 150px;

    object-fit: contain;

    border-radius: 12px;

    margin-bottom: 8px;
}


/* =====================================
   UPLOAD TEXT
===================================== */

.upload-area h4 {
    margin: 10px 0;

    color: #0f172a;

    font-size: 18px;
    font-weight: 700;
}

.upload-area p {
    margin: 0;

    color: #64748b;

    font-size: 14px;

    line-height: 1.8;
}


/* =====================================
   CHOOSE BUTTON
===================================== */

.choose-btn {
    position: relative;

    margin-top: 18px;

    width: 220px;
    height: 48px;

    border-radius: 14px;

    background: #2563eb;
    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    font-size: 15px;
    font-weight: 700;

    cursor: pointer;

    overflow: hidden;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.25);

    transition: 0.25s;
}

.choose-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}


/* =====================================
   FILE INPUT
===================================== */

.choose-btn input[type="file"] {
    position: absolute !important;

    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    opacity: 0 !important;

    display: block !important;

    cursor: pointer !important;
}


/* =====================================
   RESET BUTTON
===================================== */

.btn-reset {
    width: 150px;
    height: 40px;

    margin-top: 14px;

    border: 0;
    border-radius: 12px;

    background: #fee2e2;
    color: #dc2626;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}

.btn-reset:hover {
    background: #fecaca;
}


/* =====================================
   INFO
===================================== */

.info {
    margin-top: 12px;

    padding: 11px 12px;

    border-radius: 12px;

    background: #eff6ff;

    color: #475569;

    font-size: 14px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
}

.info span {
    min-width: 0;
}

.info b {
    color: #2563eb;

    max-width: 60%;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =====================================
   SETTINGS GROUP
===================================== */

.setting-group {
    margin-bottom: 15px;
}

.setting-group > label {
    display: block;

    margin-bottom: 7px;

    color: #334155;

    font-size: 14px;

    font-weight: 700;
}


/* =====================================
   PRESET GRID
===================================== */

.preset-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 7px;
}

.preset-btn {
    min-height: 42px;

    border: 1px solid #cbd5e1;

    border-radius: 11px;

    background: #f8fafc;

    color: #334155;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 6px;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}

.preset-btn i {
    color: #2563eb;
}

.preset-btn:hover {
    background: #eff6ff;

    border-color: #2563eb;
}

.preset-btn.active {
    background: #2563eb;

    border-color: #2563eb;

    color: #ffffff;
}

.preset-btn.active i {
    color: #ffffff;
}


/* =====================================
   SETTING HEADING
===================================== */

.setting-heading {
    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 5px;
}

.setting-heading label {
    margin: 0 !important;

    color: #334155;

    font-size: 13px;

    font-weight: 700;
}

.setting-heading label i {
    color: #2563eb;

    margin-right: 4px;
}

.setting-heading strong {
    color: #2563eb;

    font-size: 13px;

    font-weight: 800;
}


/* =====================================
   ALL RANGE SLIDERS
===================================== */

#enhancementRange,
#brightnessRange,
#contrastRange,
#saturationRange,
#sharpnessRange {
    display: block !important;

    visibility: visible !important;

    opacity: 1 !important;

    width: 100% !important;

    height: 25px !important;

    margin: 2px 0 0 !important;

    padding: 0 !important;

    border: 0 !important;

    background: transparent !important;

    cursor: pointer !important;

    appearance: auto !important;

    -webkit-appearance: auto !important;

    accent-color: #2563eb !important;
}


/* =====================================
   CHROME / EDGE TRACK
===================================== */

#enhancementRange::-webkit-slider-runnable-track,
#brightnessRange::-webkit-slider-runnable-track,
#contrastRange::-webkit-slider-runnable-track,
#saturationRange::-webkit-slider-runnable-track,
#sharpnessRange::-webkit-slider-runnable-track {

    width: 100%;

    height: 6px;

    background: #dbeafe;

    border-radius: 10px;

    cursor: pointer;
}


/* =====================================
   CHROME / EDGE THUMB
===================================== */

#enhancementRange::-webkit-slider-thumb,
#brightnessRange::-webkit-slider-thumb,
#contrastRange::-webkit-slider-thumb,
#saturationRange::-webkit-slider-thumb,
#sharpnessRange::-webkit-slider-thumb {

    -webkit-appearance: none;

    appearance: none;

    width: 18px;

    height: 18px;

    margin-top: -6px;

    border-radius: 50%;

    background: #2563eb;

    border: 3px solid #ffffff;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, 0.20);

    cursor: pointer;
}


/* =====================================
   FIREFOX TRACK
===================================== */

#enhancementRange::-moz-range-track,
#brightnessRange::-moz-range-track,
#contrastRange::-moz-range-track,
#saturationRange::-moz-range-track,
#sharpnessRange::-moz-range-track {

    width: 100%;

    height: 6px;

    background: #dbeafe;

    border-radius: 10px;
}


/* =====================================
   FIREFOX THUMB
===================================== */

#enhancementRange::-moz-range-thumb,
#brightnessRange::-moz-range-thumb,
#contrastRange::-moz-range-thumb,
#saturationRange::-moz-range-thumb,
#sharpnessRange::-moz-range-thumb {

    width: 18px;

    height: 18px;

    border-radius: 50%;

    background: #2563eb;

    border: 3px solid #ffffff;

    box-shadow:
        0 2px 7px rgba(0, 0, 0, 0.20);

    cursor: pointer;
}


/* =====================================
   OUTPUT FORMAT
===================================== */

.format-display {
    width: 100%;

    min-height: 48px;

    box-sizing: border-box;

    border: 1px solid #dbeafe;

    border-radius: 13px;

    background: #eff6ff;

    display: flex;

    align-items: center;

    padding: 0 14px;

    gap: 10px;
}

.format-display i {
    font-size: 20px;

    color: #2563eb;
}

.format-display span {
    color: #0f172a;

    font-size: 14px;

    font-weight: 800;
}

.format-display strong {
    margin-left: auto;

    color: #2563eb;

    font-size: 13px;
}


/* =====================================
   PRIMARY BUTTON
===================================== */

.btn-primary {
    width: 100%;

    min-height: 48px;

    margin-top: auto;

    border: 0;

    border-radius: 14px;

    background: #2563eb;

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}

.btn-primary:hover {
    background: #1d4ed8;

    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.65;

    cursor: wait;

    transform: none;
}


/* =====================================
   SECONDARY BUTTON
===================================== */

.btn-secondary {
    width: 100%;

    height: 43px;

    margin-top: 10px;

    border: 1px solid #cbd5e1;

    border-radius: 14px;

    background: #f8fafc;

    color: #334155;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    font-size: 14px;

    font-weight: 700;

    cursor: pointer;

    transition: 0.2s;
}

.btn-secondary:hover {
    background: #e2e8f0;
}


/* =====================================
   RESULT PREVIEW
===================================== */

.result-preview {
    height: 300px;

    margin-bottom: 15px;

    padding: 15px;

    box-sizing: border-box;

    border: 1px solid #e2e8f0;

    border-radius: 18px;

    background: #f8fafc;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;
}

.result-preview img {
    display: none;

    max-width: 100%;

    max-height: 100%;

    object-fit: contain;

    border-radius: 8px;
}

#resultText {
    color: #94a3b8;

    font-size: 15px;

    text-align: center;
}


/* =====================================
   DOWNLOAD BUTTON
===================================== */

.btn-success {
    width: 100%;

    min-height: 48px;

    margin-top: auto;

    border-radius: 14px;

    background: #16a34a;

    color: #ffffff;

    text-decoration: none;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    font-size: 15px;

    font-weight: 700;

    transition: 0.2s;
}

.btn-success:hover {
    background: #15803d;

    transform: translateY(-1px);
}

.btn-success.disabled {
    opacity: 0.45;

    pointer-events: none;

    cursor: not-allowed;
}


/* =====================================
   CONTENT CARD
===================================== */

.content-card {
    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 24px;

    padding: 30px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.06);
}

.content-card h2 {
    text-align: center;

    color: #0f172a;

    font-size: 28px;

    font-weight: 800;

    margin: 0 0 28px;
}


/* =====================================
   FEATURES
===================================== */

.feature-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 18px;
}

.feature-item {
    padding: 22px;

    border: 1px solid #e2e8f0;

    border-radius: 18px;

    background: #f8fafc;

    text-align: center;

    transition: 0.2s;
}

.feature-item:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.06);
}

.feature-item i {
    font-size: 28px;

    color: #2563eb;

    margin-bottom: 12px;
}

.feature-item h3 {
    margin: 0 0 8px;

    color: #0f172a;

    font-size: 17px;
}

.feature-item p {
    margin: 0;

    color: #64748b;

    font-size: 14px;

    line-height: 1.6;
}


/* =====================================
   STEPS
===================================== */

.steps-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;
}

.step {
    padding: 20px;

    text-align: center;
}

.step span {
    width: 42px;

    height: 42px;

    margin: 0 auto 12px;

    border-radius: 50%;

    background: #2563eb;

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 18px;

    font-weight: 800;
}

.step h3 {
    margin: 0 0 8px;

    color: #0f172a;

    font-size: 17px;
}

.step p {
    margin: 0;

    color: #64748b;

    font-size: 14px;

    line-height: 1.6;
}


/* =====================================
   FAQ
===================================== */

.faq-card details {
    margin-bottom: 12px;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    background: #f8fafc;

    overflow: hidden;
}

.faq-card summary {
    position: relative;

    padding: 17px 45px 17px 18px;

    color: #0f172a;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    list-style: none;
}

.faq-card summary::-webkit-details-marker {
    display: none;
}

.faq-card summary::after {
    content: "+";

    position: absolute;

    right: 18px;

    top: 50%;

    transform: translateY(-50%);

    color: #2563eb;

    font-size: 22px;

    font-weight: 800;
}

.faq-card details[open] summary::after {
    content: "−";
}

.faq-card details p {
    margin: 0;

    padding: 0 18px 18px;

    color: #64748b;

    font-size: 14px;

    line-height: 1.7;
}


/* =====================================
   TABLET
===================================== */

@media (max-width: 1100px) {

    .enhancer-box {
        grid-template-columns: 1fr;
    }

    .feature-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


/* =====================================
   MOBILE
===================================== */

@media (max-width: 600px) {

    .tool-hero {
        padding: 30px 15px 20px;
    }

    .tool-hero h1 {
        font-size: 30px;
    }

    .tool-hero p {
        font-size: 15px;
    }

    .enhancer-card {
        min-height: auto;

        padding: 18px;
    }

    .upload-area {
        min-height: 280px;
    }

    .choose-btn {
        width: 200px;
    }

    .feature-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .content-card {
        padding: 20px;
    }

    .content-card h2 {
        font-size: 23px;
    }

    .preset-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    #enhancementRange,
    #brightnessRange,
    #contrastRange,
    #saturationRange,
    #sharpnessRange {
        height: 30px !important;
    }

}