
/*My addition to style*/
#hsn-result-container{direction:ltr;}
#hsn-svg-math{margin: 0 auto;    display: block;}
/*paper shadow*/
.bended-shadow {
    position: relative;
    width: 306px;
    margin: 0;
    margin-bottom: 10px;
}
.bended-shadow::before, .bended-shadow::after {
    content: '';
    position: absolute;
    width: 59%;
    height: 41px;
    -webkit-box-shadow: 0 0 36px rgba(0,0,0,1);
    -moz-box-shadow: 0 0 36px rgba(0,0,0,1);
    -ms-box-shadow: 0 0 36px rgba(0,0,0,1);
    -o-box-shadow: 0 0 36px rgba(0,0,0,1);
    box-shadow: 0 0 17px rgba(0, 0, 0, 1);
    -webkit-transform: rotate(-3deg) skew(-10deg);
    -moz-transform: rotate(-3deg) skew(-10deg);
    -o-transform: rotate(-3deg) skew(-10deg);
    -ms-transform: rotate(-3deg) skew(-10deg);
    transform: rotate(357deg) skew(346deg);
    left: 19px;
    bottom: 13px;
    z-index: 0;
}
#hsn-svg-math {
    position: relative;
    bottom: 1px;
    background-color: #FFF;
    border-bottom: 1px solid #CACACA;
    z-index: 1;
    -webkit-box-shadow: 0 1px 1px rgba(0,0,0,.1);
    -moz-box-shadow: 0 1px 1px rgba(0,0,0,.1);
    -ms-box-shadow: 0 1px 1px rgba(0,0,0,.1);
    -o-box-shadow: 0 1px 1px rgba(0,0,0,.1);
    box-shadow: 0 1px 1px rgba(0,0,0,.1);
}
/*generate button*/
.hsn-generate-btn {
    position: relative;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    outline-offset: 4px;
    transition: filter 250ms;
    user-select: none;
    touch-action: manipulation;
    border-radius: 12px;
    margin: 0 auto;
    display: block;
    margin-top: 33px;
}

.shadow {
 position: absolute;
 top: 0;
 left: 0;
 width: 100%;
 height: 100%;
 border-radius: 12px;
 background: hsl(0deg 0% 0% / 0.25);
 will-change: transform;
 transform: translateY(2px);
 transition: transform
    600ms
    cubic-bezier(.3, .7, .4, 1);
}

.edge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    background: linear-gradient(to left, hsl(34 100% 16% / 1) 0%, hsl(27 100% 32% / 1) 8%, hsl(26 100% 32% / 1) 92%, hsl(27 100% 16% / 1) 100%);
}

.front {
    display: block;
    position: relative;
    padding: 12px 27px;
    border-radius: 12px;
    font-size: 1.1rem;
    color: white;
    background: hsl(26 100% 47% / 1);
    will-change: transform;
    transform: translateY(-4px);
    transition: transform    600ms    cubic-bezier(.3, .7, .4, 1);
}

.hsn-generate-btn:hover {
 filter: brightness(110%);
}

.hsn-generate-btn:hover .front {
 transform: translateY(-6px);
 transition: transform    250ms    cubic-bezier(.3, .7, .4, 1.5);
}

.hsn-generate-btn:active .front {
 transform: translateY(-2px);
 transition: transform 34ms;
}

.hsn-generate-btn:hover .shadow {
 transform: translateY(4px);
 transition: transform    250ms    cubic-bezier(.3, .7, .4, 1.5);
}

.hsn-generate-btn:active .shadow {
 transform: translateY(1px);
 transition: transform 34ms;
}

.hsn-generate-btn:focus:not(:focus-visible) {
 outline: none;
}

/*The rest of this file is for main important styles*/

#hsn-generator-container {
    direction: rtl;
    margin: 20px auto;
    display: flex;
    justify-content: space-between;
}
@media (max-width:972px){
#hsn-generator-container {
    flex-direction: column;
}
.hsn-controls {

    margin-bottom: 20px;
}
}
/* تنسيق حقول الاختيار لجعل السهم على اليسار */
#hsn-generator-container select {
    appearance: none;       /* إلغاء سهم المتصفح الافتراضي */
    -webkit-appearance: none;
    -moz-appearance: none;
    
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M6 9l6 6 6-6"/></svg>');
    background-repeat: no-repeat;
    background-position: left 10px center; /* وضع السهم المخصص على اليسار */
    background-size: 15px;
    padding-left: 35px !important;       /* ترك مساحة للسهم على اليسار */
    padding-right: 10px !important;      /* تقليل المساحة على اليمين */
}
.hsn-controls {
    background: #fdfdfd;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-left: 20px;
    width: 100%;
}
.hsn-row { display: flex; gap: 15px; margin-bottom: 15px; }
.hsn-field { flex: 1; }
.hsn-field label { display: block; font-size: 13px; color: #555; }
.hsn-field input, .hsn-field select { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; background: #fff;color:#000}
.hsn-field input:hover, .hsn-field select:hover {
    border-color: #f06800;
}
.hsn-number-stepper { display: flex; border: 1px solid #ccc; border-radius: 4px; width: fit-content; background: #fff; }
.hsn-number-stepper button { border: none; padding: 0 12px; cursor: pointer; background: #eee; color: #000;    border-radius: 0;font-size: 30px; transition:.3s ease-in-out;}
 .hsn-number-stepper button:hover{     background:#89d334e3; }
.hsn-number-stepper input { width: 50px; border: none; text-align: center; font-weight: bold;background: white; }
.hsn-number-stepper input:focus {    border-style: unset;}
.hsn-tabs {
    display: flex;
    align-items: center;
    margin-bottom: 0px;
    background: #ececec;
}
.print-buttons {
    border-top: 1px solid #c7c4c4;
}
.hsn-preview-area {
    background: #ececec;
    padding: 20px;
    padding-bottom: 20px;
}
.hsn-tab-btn {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    background: #e4e4e4;
    color: #000000;
}
.hsn-tab-btn:hover{
    color:#282828;
    background:#afafaf4a
}
.hsn-tab-btn.active {
    color: #474747;
    font-weight: bold;
    border-width: 1px 1px 1px 1px;
    border-color: #c2bdbd;
    border-bottom: 0;
    border-radius: 0;
    z-index: 8;
    background: white;
}
.hsn-print-btn { margin-right: auto; background: #333; color: #fff; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; }

    @media (max-width: 490px){
        .hsn-num-d {flex-wrap: wrap;
    justify-content: space-between;}
    }

/* تنسيق أزرار الأوامر */
.hsn-action-btn {
    margin-right: 5px;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: white;
}
.hsn-action-btn.generate { background: #2196F3; } /* أزرق */
.hsn-action-btn.print-q { background: #2d3436; color:#fff; }    /* أسود */
.hsn-action-btn.print-a { background: #fdf2e9;  color:#2d3436;} /* وردي/أحمر */

/* إعدادات الطباعة */
/* إعدادات الطباعة */
@media print {
/* 1. إخفاء كل شيء تماماً */
    html, body {
        height: 100%;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden; /* لمنع التمرير وبالتالي منع صفحات إضافية */
    }
    /* 3. إلغاء أي هوامش أو تذييل تلقائي من المتصفح */
    @page {
        margin: 0;
        size: auto;
    }
    .no-print { display: none !important; }
    #hsn-generator-container { margin: 0; padding: 0; border: none; }
        #hsn-result-container svg { width: 100% !important; height: auto !important; }



        body * { visibility: hidden; }

    /* إخفاء كل شيء في صفحة ووردبريس */
    
    /* إظهار حاوية الصورة فقط وما بداخلها */
    #hsn-result-container, #hsn-result-container * {
        visibility: visible;
    }
        /* وضع الصورة في أعلى الصفحة تماماً وإلغاء الهوامش */
    #hsn-result-container {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    
    /* إخفاء أي إطارات أو ظلال قد تظهر في المعاينة */
    .hsn-preview-area { border: none !important; padding: 0 !important; }
}
.hsn-controls h3{
font-size: 18px;
}