/* ===================================
SIGNATURE RESIZE TOOL
=================================== */

/* WRAPPER */

.snf-tool-wrapper.snf-signature-container{
max-width:1000px;
margin:40px auto;
padding:0 20px;
box-sizing:border-box;
}

/* TITLE */

.snf-tool-title{
text-align:center;
font-size:56px;
font-weight:700;
line-height:1.2;
margin:20px 0 35px;
color:#0b2f63;
}

/* UPLOAD AREA */

.snf-upload-box{
background:#eef2f6;
border:2px dashed #0073aa;
border-radius:18px;
padding:55px 30px;
text-align:center;
max-width:620px;
margin:0 auto 30px;
}

.snf-upload-heading{
font-size:22px;
font-weight:700;
margin:0 0 18px;
line-height:1.3;
color:#111;
}

.snf-upload-subtitle{
display:block;
font-size:15px;
margin-bottom:24px;
color:#666;
}

/* BUTTONS */

.snf-upload-btn,
#resize-signature-btn,
#download-btn,
#clear-btn{
border:none;
border-radius:10px;
padding:14px 28px;
font-size:16px;
font-weight:600;
cursor:pointer;
}

.snf-upload-btn,
#resize-signature-btn,
#download-btn{
background:#0073aa;
color:#fff;
}

#clear-btn{
background:#5a5a5a;
color:#fff;
}

/* TOP CONTROLS */

.snf-top-controls{
display:flex;
gap:12px;
margin:18px 0;
}

.snf-top-controls input{
flex:1;
}

.snf-top-controls select{
    width:180px;
    min-width:180px;
    flex-shrink:0;
}

/* MAIN LAYOUT */

.snf-main-layout{
display:grid;
grid-template-columns:minmax(0,1fr) 280px;
gap:30px;
align-items:start;
margin-top:20px;
}

/* LEFT */

.snf-left-panel{
min-width:0;
}

/* ===================================
   TOOL SETTINGS
=================================== */

.snf-tool-settings{

margin:0 0 16px;
border:1px solid #d9e2ec;
border-radius:12px;
background:#fff;
overflow:hidden;
box-shadow:0 2px 6px rgba(0,0,0,.04);

}

.snf-tool-settings summary{

list-style:none;
cursor:pointer;
padding:16px 20px;
font-size:17px;
font-weight:600;
color:#163a63;
background:#f8fafc;

}

.snf-tool-settings summary::-webkit-details-marker{

display:none;

}

.snf-tool-settings summary::before{

content:"▶";
display:inline-block;
margin-right:10px;
transition:.2s;

}

.snf-tool-settings[open] summary::before{

transform:rotate(90deg);

}

.snf-tool-settings[open] summary{

border-bottom:1px solid #e5e7eb;

}

.snf-tool-settings > *:not(summary){

padding:18px 20px;

}

/* RIGHT */

.snf-right-panel{
width:280px;
display:flex;
flex-direction:column;
gap:18px;
}

/* PREVIEW */

.snf-preview-box{
border:1px solid #dcdcdc;
border-radius:12px;
background:#fff;
padding:16px;
min-height:360px;
box-sizing:border-box;
text-align:center;
}

.snf-preview-box h4{
margin:0 0 15px;
font-size:18px;
font-weight:700;
}

#dimension-unit,
#dpi-select{
    width:100%;
    height:42px;
    padding:0 12px;
    box-sizing:border-box;
}

#output-format{
    width:180px;
    min-width:180px;
    height:42px;
    padding:0 12px;
    box-sizing:border-box;
}

#dimension-unit option,
#dpi-select option,
#output-format option {
    font-size: 14px;
}

#original-preview{
width:100%;
min-height:280px;
display:flex;
justify-content:center;
align-items:center;
overflow:hidden;
}

#original-preview img,
#original-preview canvas{
max-width:100%;
max-height:300px;
object-fit:contain;
}

#download-btn{
    display:block;
    width:100%;
    margin-top:15px;
}

.snf-preview-box{
    min-height:520px;
}

.snf-preview-placeholder{
width:100%;
min-height:260px;
border:1px dashed #cccccc;
border-radius:8px;
display:flex;
justify-content:center;
align-items:center;
color:#666;
font-size:15px;
}

.snf-accordion-item{
    width:100%;
    box-sizing:border-box;
}


/* ROTATION SLIDER */

#rotation-angle{
-webkit-appearance:none;
appearance:none;
width:100%;
height:6px;
border-radius:999px;
background:#d7e7f5;
outline:none;
margin-top:12px;
cursor:pointer;
transition:.3s;
}

#rotation-angle:hover{
background:#c5dcf0;
}

/* Chrome / Edge */

#rotation-angle::-webkit-slider-thumb{
-webkit-appearance:none;
appearance:none;
width:22px;
height:22px;
border-radius:50%;
background:#0073aa;
border:4px solid #ffffff;
box-shadow:0 4px 12px rgba(0,115,170,.35);
cursor:pointer;
transition:.25s;
}

#rotation-angle::-webkit-slider-thumb:hover{
transform:scale(1.15);
background:#005f8d;
}

/* Firefox */

#rotation-angle::-moz-range-thumb{
width:22px;
height:22px;
border:none;
border-radius:50%;
background:#0073aa;
box-shadow:0 4px 12px rgba(0,115,170,.35);
cursor:pointer;
}

#rotation-angle::-moz-range-track{
height:6px;
border-radius:999px;
background:#d7e7f5;
}

/* MOBILE */

@media(max-width:768px){

.snf-tool-title{
font-size:36px;
}

.snf-main-layout{
grid-template-columns:1fr;
}

.snf-right-panel{
width:100%;
}

.snf-top-controls{
flex-direction:column;
}

.snf-action-buttons{
justify-content:center;
}

}