

/* 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{
    max-width:900px;
    width:100%;
    margin:0 auto;
    padding:0 15px;
}

.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{
    width:100%;
    max-width:100%;
    position:relative;
    border:2px dashed #007bff;
    background:linear-gradient(180deg,#f3f9ff,#e6f1ff);
    padding:20px;
    border-radius:8px;
    text-align:center;
    transition:.3s;
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
}

.upload-ui {
  text-align: center;
  pointer-events: none;
}


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;
    }
}



input[type="file"],
input[type="number"],
input[type="range"],
select{
    width:100%;
    max-width:100%;
    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:13px;
    border:none;
    border-radius:4px;
    cursor:pointer;
    transition:background .3s;
    box-sizing:border-box;
}

button:hover{
    background:#218838;
}

/* 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%;
    }
}




/* PREVIEW GRID */
.preview-area {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 12px auto;
  max-width: 600px;
  justify-items: center;
}

@media (min-width: 768px) {
  .preview-area {
    grid-template-columns: repeat(3, 1fr);
  }
}

.preview-item {
  position: relative;
  width: 100%;
  max-width: 120px;
}

.preview-img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
}

.remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: #ff3b3b;
  color: #fff;
  font-size: 14px;
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.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); }
}

/* =====================================================
   MORE TOOLS - Original Color + 3D + Proper Gap
   ===================================================== */
.tools-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
    max-width:1100px;
    margin:20px auto;
}

.tool-card{
    display:flex;
    align-items:center;
    gap:15px;
    background:#eef7ff;
    border:1px solid #d7e8ff;
    border-radius:14px;
    padding:15px;
    text-decoration:none;
    box-shadow:0 3px 10px rgba(0,0,0,.08);
    transition:.25s;
}

.tool-card:hover{
    background:#e2f2ff;
    transform:translateY(-2px);
}

.icon{
    flex:0 0 72px;
}

.icon img{
    width:72px;
    height:72px;
    object-fit:cover;
    border-radius:10px;
    display:block;
}

.tool-content{
    flex:1;
    text-align:left;
}

.tool-content h3{
    margin:0 0 6px;
    font-size:18px;
    color:#111;
}

.tool-content p{
    margin:0;
    font-size:13px;
    color:#666;
    line-height:1.5;
}

.tool-card,
.tool-card:hover,
.tool-card:visited{
    text-decoration:none;
    color:inherit;
}

@media(max-width:768px){

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

    .tool-card{
        padding:12px;
        gap:12px;
    }

    .icon{
        flex:0 0 58px;
    }

    .icon img{
        width:58px;
        height:58px;
    }

    .tool-content h3{
        font-size:16px;
    }

    .tool-content p{
        font-size:12px;
    }

}

.tool-content{
    flex:1;
    text-align:left;
}

.tool-content h3{
    margin:0 0 5px;
    font-size:17px;
    font-weight:700;
    color:#111827;
    line-height:1.3;
}

.tool-content p{
    margin:0;
    font-size:13px;
    color:#6b7280;
    line-height:1.5;
}

@media (max-width:768px){
    .tool-content h3{
        font-size:15px;
    }

    .tool-content p{
        font-size:12px;
    }
}

/* Remove underline from all links globally */

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

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

/* 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;
}

/* FAQ Section */
.faq-section {
    text-align: left;
    padding: 5px;
    margin-top: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.faq-section h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.faq-item {
    margin-bottom: 5px;
}

.faq-item p {
    font-size: 14px;
    margin-bottom: 3px;
}

/* ===============================
   WORDPRESS BLOCK OVERRIDES
   (PREVENT POST-LOAD GAP)
================================ */

/* 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 CENTER */
#result-area{
    max-width:900px;
    width:100%;
    margin:0 auto;
}

/* RECTANGLE BOX */
.result-item {
    display: flex;
    align-items: center;
    gap: 25px;

    background: #e6f2ff; /* light blue */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #cce0ff;

    margin-bottom: 25px;
}

/* LEFT IMAGE */
.result-image img {
    width: 160px;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* RIGHT DETAILS */
.result-details {
    flex: 1;
}

.result-details p {
    margin: 6px 0;
    font-size: 14px;
}

/* DOWNLOAD BUTTON */
.download-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 18px;
    background: #1976d2;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
}

/* COMPRESS MORE BUTTON */
.compress-more-btn {
    display: block;
    margin: 30px auto;
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* MOBILE FIX */
@media (max-width: 600px) {
    .result-item {
        flex-direction: column;
        text-align: center;
    }

    .result-image img {
        width: 100%;
        max-width: 250px;
    }

    .download-btn {
        width: 100%;
    }
}

#loading{
    margin-top:0 !important;
}

#result-title{
    margin:0 !important;
}

canvas{
    display:none;
}

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;
    }
}

