

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #fff;
    color: #333;
    min-height: 100vh;
    text-align: center;
}
.tool-wrapper{
    width:100%;
    margin:0 auto;
    padding:0 15px
    background:#000;
}

.tool-wrapper .container{
    width:100%;
    max-width:100%;
    background:#fff;
    border-radius:12px;
    padding:16px;
    box-shadow:0 6px 18px rgba(0,0,0,.08);
}
/* Exclude header and footer containers */
header .container,
footer .container {
    background: transparent !important;
    box-shadow: none !important;
}

/* Header */
h1 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

p {
    font-size: 14px;
    margin-bottom: 4px;
}

footer ul li {
  font-size: 14px;
}

/* Labels */
label {
    margin: 0;
    padding: 0;
    font-size: 13px;
    font-weight: bold;
}



/* =========================================
   UPLOAD BOX
========================================= */

.upload-box {
    width: 100%;
    max-width: 100%;
    position: relative;
    box-sizing: border-box;
    border: 2px dashed #007bff;
    background: linear-gradient(180deg, #f3f9ff, #e6f1ff);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: background 0.3s, border-color 0.3s;
    overflow: hidden;
}

.upload-box * {
    box-sizing: border-box;
}

/* =========================================
   FILE INPUT OVERLAY
   ORIGINAL WORKING UPLOAD BEHAVIOR
========================================= */

.file-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    pointer-events: auto;
}

/* Disable file input overlay after image selection */

.upload-box.has-image .file-input {
    pointer-events: none;
}

/* =========================================
   UPLOAD UI
========================================= */

.upload-ui {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

/* Hide upload instructions while image is selected */

.upload-box.has-image > .upload-ui {
    display: none !important;
}

/* =========================================
   PREVIEW AREA
========================================= */

.preview-area {
    width: 100%;
    position: relative;
}

/* =========================================
   CROPPER EDITOR
========================================= */

.crop-editor {
    display: none;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 600px;
    margin: 15px auto 0;
    text-align: center;
    pointer-events: auto;
}

/* =========================================
   FIXED CROP IMAGE WRAPPER
========================================= */

.crop-image-wrapper {
    width: 100%;
    max-width: 600px;
    height: 400px;
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    touch-action: none;
    pointer-events: auto;
}

/* Original crop image */

.crop-image-wrapper img {
    display: block;
    max-width: 100%;
}

/* Cropper generated container */

.crop-image-wrapper .cropper-container {
    max-width: 100%;
}

/* Cropper touch interaction */

.crop-image-wrapper .cropper-canvas,
.crop-image-wrapper .cropper-drag-box,
.crop-image-wrapper .cropper-crop-box,
.crop-image-wrapper .cropper-face {
    touch-action: none;
}

/* =========================================
   CROP CONTROLS
========================================= */

.crop-controls {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 600px;
    margin: 12px auto 0;
    padding: 0 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-sizing: border-box;
    pointer-events: auto;
}

/* LOCK ASPECT RATIO */
.crop-ratio-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
    white-space: nowrap;
}

.crop-ratio-option input {
    width: 17px;
    height: 17px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
}

/* APPLY CROP BUTTON */
.apply-crop-btn {
    display: block;
    width: auto;
    min-width: 0;
    max-width: 150px;
    min-height: 30px;
    margin: 0;
    padding: 8px 14px;
    border: 0;
    border-radius: 7px;
    background: #007bff;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: normal;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    white-space: nowrap;
    flex-shrink: 1;
}

.apply-crop-btn:hover {
    background: #0069d9;
}

.apply-crop-btn:active {
    transform: none;
}

.apply-crop-btn:focus {
    outline: none;
}

.apply-crop-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* MOBILE */
@media (max-width: 480px) {
    .crop-controls {
        gap: 8px;
        padding: 0 5px;
    }

    .crop-ratio-option {
        font-size: 12px;
        gap: 4px;
    }

    .crop-ratio-option input {
        width: 15px;
        height: 15px;
    }

    .apply-crop-btn {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 12px;
    }
}
/* =========================================
   RESET / UPLOAD STATE
========================================= */

.upload-box:not(.has-image) .crop-editor {
    display: none;
}

.upload-box:not(.has-image) .file-input {
    pointer-events: auto;
    cursor: pointer;
}

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

@media (max-width: 600px) {

    .upload-box {
        padding: 15px;
    }

    .crop-editor {
        margin-top: 12px;
    }

    .crop-image-wrapper {
        height: 350px;
        min-height: 0;
    }

    .crop-controls {
        margin-top: 12px;
        gap: 10px;
    }

    .apply-crop-btn {
        width: 100%;
        max-width: 100%;
        min-height: 48px;
    }
}


form{
    display:flex;
    flex-direction:column;
    width:100%;
    align-items:stretch;
    gap:5px;
}

/* Desktop */
.action-row{
    display:flex;
    align-items:flex-end;
    gap:12px;
}

.target-group{
    flex:1;
}


/* Resize controls */
.resize-row{
    flex:2;
    min-width:0;
}

.resize-controls{
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:nowrap;
}

.resize-option{
    display:flex;
    align-items:center;
    gap:4px;
    white-space:nowrap;
}

#dimension-inputs{
    display:flex;
    gap:8px;
    flex-shrink:0;
}

#dimension-inputs input{
    width:90px !important;
    max-width:90px !important;
    flex:0 0 90px !important;
}

/* Mobile */
@media (max-width:768px){

    .action-row{
        flex-direction:column;
        align-items:stretch;
    }

    .target-group,
    .resize-row,
   
    .resize-controls{
        flex-wrap:wrap;
    }

    #dimension-inputs{
        width:100%;
    }

    #dimension-inputs input{
        flex:1;
        width:auto;
    }
}
/* for Resizer*/

#resizer-inputs{
    display:flex;
    gap:12px;
}

#resizer-inputs .dimension-group{
    flex:1;
}



input[type="number"],
input[type="range"],
select{
    width:100%;
    max-width:100%;
    height:35px;
    padding:5px 6px;
    border:1px solid #A2A2A2;
    border-radius:4px;
    font-size:13px;
    background:#fff;
    box-sizing:border-box;
}

input[type="file"]{
    cursor:pointer;
}



/* Button */
button{
    width:100%;
    background:#007cf8;
    color:#fff;
    padding:6px 10px;
    font-size:16px;
    font-weight:600;
    border:none;
    border-radius:4px;
    cursor:pointer;
    transition:background .3s;
    box-sizing:border-box;
}

button:hover{
    background:#0056b3;
}

/* Download Button */
.download-btn{
    display:inline-block;
    margin-top:6px;
    padding:6px 10px;
    background:#007bff;
    color:#fff;
    font-size:12px;
    text-decoration:none;
    border-radius:4px;
}

.download-btn:hover{
    background:#0056b3;
}

/* Mobile */
@media(max-width:768px){

    .action-row{
        flex-direction:column;
    }

    .target-group,
    .button-group{
        width:100%;
    }
}






.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===========================
   TOOLS GRID
=========================== */

.tools-grid{
    display:grid;
    grid-template-columns:repeat(2, 1fr);
    gap:8px;
    width:100%;
}

.tools-grid .tool-card{
    display:flex;
    align-items:center;
    justify-content:center;

    padding:10px 12px;
    border:1px solid #1976d2;
    border-radius:6px;
    background:#fff;
    color:#1976d2 !important;
    text-decoration:none !important;
    font-size:13px;
    font-weight:600;
    text-align:center;
    box-sizing:border-box;
}

.tools-grid .tool-card .title{
    color:inherit;
    text-decoration:none !important;
}

.tools-grid .tool-card:hover{
    background:#1976d2;
    color:#fff !important;
}

.tools-grid .tool-card:hover .title{
    color:#fff !important;
}

@media (max-width:600px){

    .tools-grid{
        grid-template-columns:1fr;
    }

    .tools-grid .tool-card{
        font-size:12px;
        padding:10px;
    }
}





/* Outer container only */
.tool-article {
  background: #f4f6f8;
  border: 1px solid #e3e8ec;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  padding: 10px;
  margin-top: 35px;
  margin-bottom: 10px;
}

/* Base styles */
.tool-article {
  margin-top: 45px;
  padding: 15px;
  text-align: left;
  line-height: 1.6;
  font-size: 14px;
  color: #222;
}

.tool-article h1 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.tool-article h2 {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.tool-article h3 {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}
.tool-article p {
  margin: 0 0 16px;
}

.tool-article ul,
.tool-article ol {
  margin: 0 0 16px 22px;
  padding: 0;
}


/* Responsive article images */
.tool-article img {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 15px auto;
    box-sizing: border-box;
}


/* Kill WordPress auto spacing */
.entry-content > *,
.wp-block-heading,
.wp-block-paragraph {
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}

.container > h1:first-child {
  margin-top: 0 !important;
}

p:empty,
p > br:only-child {
  display: none !important;
}

.container {
  padding-top: 1px;
}




/* RESULT AREA */
#result-area {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* RESULT RECTANGLE BOX */
.result-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;

    width: 100%;
    box-sizing: border-box;

    background: #e6f2ff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #cce0ff;

    margin-bottom: 25px;
}

/* LEFT IMAGE - SMALL THUMBNAIL */
.result-image {
    flex: 0 0 150px;
    width: 150px;
    max-width: 150px;
}

.result-image img {
    display: block;
    width: 150px;
    height: 150px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* RIGHT SIDE DETAILS */
.result-details {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.result-details p {
    margin: 6px 0;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* DOWNLOAD BUTTON */
.result-details .download-btn {
    display: inline-block;
    margin-top: 10px;
}

/* MOBILE */
@media (max-width: 480px) {
    .result-item {
        gap: 12px;
        padding: 12px;
    }

    .result-image {
        flex: 0 0 110px;
        width: 110px;
        max-width: 110px;
    }

    .result-image img {
        width: 110px;
        height: 110px;
    }

    .result-details p {
        font-size: 12px;
    }
}

a,
a:link,
a:visited,
a:hover,
a:active,
a:focus,
a *,
a:hover * {
    text-decoration: none !important;
}

.trust-card{
    display:flex;
    width:100%;
    background:#f3f9ff;
    border:1px solid #e5e7eb;
    border-radius:8px;
    padding:6px 8px;
    margin-bottom:8px;
}

.trust-item{
    flex:1;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-align:center;
    gap:0;
    line-height:.5;
}

.trust-item svg{
    display:block;
    width:18px;
    height:18px;
    color:#1976d2;
    margin:0;
    padding:0;
    flex-shrink:0;
}

.trust-item strong{
    display:block;
    margin:-2px 0 0;
    padding:0;
    font-size:12px;
    font-weight:600;
    line-height:.8;
    color:#222;
}

.trust-item small{
    display:block;
    margin:0;
    padding:0;
    font-size:9px;
    line-height:.8;
    color:#666;
}

@media (max-width:768px){

    .trust-card{
        padding:5px 6px;
        margin-bottom:6px;
    }

    .trust-item svg{
        width:16px;
        height:16px;
    }

    .trust-item strong{
        font-size:10px;
        margin:-2px 0 0;
        line-height:.8;
    }

    .trust-item small{
        font-size:8px;
        line-height:.8;
    }
}

.kb-container{
    width:100%;
    background:#f4f6f8;
    border-radius:10px;
    padding:10px;
    margin:20px 0;
    box-sizing:border-box;
}

.kb-container > strong{
    display:block;
    margin-bottom:14px;
}
.kb-buttons{
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:center;
    align-items:center;
    gap:8px;
    margin:0;
}

.kb-buttons .kb-btn{
    display:inline-flex !important;
    width:auto !important;
    min-width:auto !important;
    max-width:max-content !important;
    flex:none !important;

    padding:6px 12px;
    border:1px solid #1976d2;
    border-radius:6px;
    background:#fff;
    color:#1976d2 !important;
    text-decoration:none !important;
    font-size:13px;
    font-weight:600;
    white-space:nowrap;
}

.kb-buttons .kb-btn:hover{
    background:#1976d2;
    color:#fff !important;
}

@media (max-width:600px){
    .kb-container{
        padding:12px;
    }

    .kb-buttons .kb-btn{
        font-size:12px;
        padding:5px 10px;
    }
}




#more-image-tools{
    width:100%;
    background:#f4f6f8;
    border-radius:10px;
    padding:10px;
    margin:20px 0;
    box-sizing:border-box;
}

#more-tools-title{
    display:block;
    margin-bottom:14px;
}

#more-tools-buttons{
    display:flex !important;
    flex-wrap:wrap !important;
    justify-content:center;
    align-items:center;
    gap:8px;
    margin:0;
}

#more-tools-buttons .more-tool-btn{
    display:inline-flex !important;
    width:auto !important;
    min-width:auto !important;
    max-width:max-content !important;
    flex:none !important;

    padding:6px 12px;
    border:1px solid #1976d2;
    border-radius:6px;
    background:#fff;
    color:#1976d2 !important;
    text-decoration:none !important;
    font-size:13px;
    font-weight:600;
    white-space:nowrap;
}

#more-tools-buttons .more-tool-btn:hover{
    background:#1976d2;
    color:#fff !important;
}

@media (max-width:600px){

    #more-image-tools{
        padding:12px;
    }

    #more-tools-buttons .more-tool-btn{
        font-size:12px;
        padding:5px 10px;
    }




.ad-container {
    width: 100%;
    min-height: 100px;
    display: block;
}