.cem-wrapper {
    max-width: 1000px;
    margin: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,.08);
    padding: 20px;
}

.cem-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content:center;
}

.cem-tab {
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    background: #eee;
    cursor: pointer;
    color:#000;
}

.cem-tab.active {
    background: #033a88;
    color: #fff;
}

.cem-content {
    display: none;
    min-height:150px;

}

.cem-content.active {
    display: block;
}

.cem-content input {
    /*width: 100%;*/
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.cem-tree {
    list-style: none;
    padding-right: 20px;
    max-height: 1300px;
    flex-wrap: wrap;
    display: flex;
    flex-direction: column;
}

.cem-tree li {
    margin: 8px 0;
}

.cem-tree ul {
    margin-right: 20px;
    border-right: 2px dashed #ddd;
    padding-right: 15px;
}

.cem-footer {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cem-footer button {
    background: #033a88;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
}

.cem-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.cem-checkbox input {
    margin: 0;
}

.cem-title {
    flex: 1;
}

.cem-price {
    color: #777;
    font-size: 13px;
}

.cem-level-1 { margin-right: 24px; }
.cem-level-2 { margin-right: 48px; }
.cem-level-3 { margin-right: 72px; }

.cem-next {
    margin-top: 20px;
    text-align: left;
}

.cem-go-final {
    background: #033a88;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
}

.cem-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #ddd;
}





.cem-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cem-level-1 { margin-right: 24px; }
.cem-level-2 { margin-right: 48px; }
.cem-level-3 { margin-right: 72px; }

.cem-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #ddd;
}

button[type="submit"]{
    padding: 7px 10px;
    font-size: 13px;
}


#profile input{
    width:100%;
    color:#000;
}

.cem-error {
    border-color: #e63946 !important;
    background: #fff5f5;
}



.cem-error-text {
    color: #e63946;
    font-size: 13px;
    margin-bottom: 10px;
}

#cem-fixed-total{
    position: absolute;
    width:180px;
    top: 100px;
    left: -10px;
    text-align:center;
    background: #033a88;
    color: #fff;
    padding: 15px 0px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    z-index: -1;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    font-weight: bold;
    rotate:-90deg;
}









#cem-form {
    position: relative;
}

/* لودر فقط در محدوده فرم */
#cem-loader {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: all;
}

/* بک‌گراند فقط روی فرم */
.cem-loader-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.85);
    border-radius: 10px;
    width:1000px;
    margin:auto;
}

/* مرکز فرم */
.cem-loader-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.cem-loader-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid #ddd;
    border-top-color: #033a88;
    border-radius: 50%;
    animation: cem-spin .9s linear infinite;
    margin: 0 auto;
}

.cem-loader-text {
    margin-top: 10px;
    font-size: 14px;
    color: #333;
}

@keyframes cem-spin {
    to { transform: rotate(360deg); }
}


/* ===== Drag & Drop Upload ===== */
.cem-upload-wrapper {
    margin-bottom: 10px;
}

.cem-upload-wrapper input[type="file"] {
    display: none;
}

.cem-upload-box {
    border: 2px dashed #d6dbf5;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: linear-gradient(180deg, #fafbff, #f3f6ff);
    transition: all .25s ease;
    display: block;
}

.cem-upload-box:hover {
    border-color: #033A88;
    background: #eef2ff;
}

.cem-upload-box.dragover {
    border-color: #033A88;
    background: #e7edff;
    box-shadow: 0 0 0 4px rgba(3,58,136,.08);
}

.cem-upload-icon {
    margin-bottom: 12px;
}

.cem-upload-text strong {
    display: block;
    font-size: 15px;
    color: #033A88;
}

.cem-upload-text span {
    font-size: 12px;
    color: #666;
}

.cem-upload-filename {
    margin-top: 12px;
    font-size: 12px;
    padding: 6px 14px;
    display: inline-block;
    border-radius: 20px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e5e8ff;
    color: #333;
}














/* ===============================
   Responsive (Tablet & Mobile)
================================ */

@media (max-width: 992px) {

    .cem-wrapper {
        padding: 15px;
        border-radius: 10px;
    }

    /* Tabs */
    .cem-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        gap: 8px;
        padding-bottom: 10px;
        padding-left: 2px;
    }

    .cem-tab {
        white-space: nowrap;
        font-size: 14px;
        padding: 8px 14px;
        flex-shrink: 0;
    }

    /* Inputs */
    .cem-content input,
    .cem-content textarea {
        /*width: 100%;*/
        font-size: 14px;
    }

    /* Tree */
    .cem-tree {
        padding-right: 10px;
        max-height: none;
    }

    .cem-tree ul {
        margin-right: 12px;
        padding-right: 10px;
    }

    /* Checkbox rows */
    .cem-checkbox {
        align-items: flex-start;
        gap: 8px;
        flex-wrap: wrap;
    }

    .cem-checkbox span {
        line-height: 1.6;
    }

    .cem-price {
        width: 100%;
        font-size: 12px;
        color: #555;
        margin-right: 26px;
    }

    /* Buttons */
    .cem-go-final,
    #final button {
        width: 100%;
        padding: 14px;
        font-size: 15px;
        border-radius: 10px;
    }
}

/* ===============================
   Mobile (Small devices)
================================ */

@media (max-width: 576px) {

    .cem-wrapper {
        box-shadow: none;
        border-radius: 0;
    }

    /* Fixed total */
    #cem-fixed-total {
        font-size: 10px;
        padding: 8px 10px;
        width: 150px;
        rotate: unset;
        top: -30px;
        left: 0px;
    }

    /* Tabs */
    .cem-tab {
        font-size: 13px;
        padding: 7px 12px;
    }

    /* Tree depth control */
    .cem-tree ul {
        border-right: 1px dashed #ccc;
    }

    /* Summary */
    #cem-summary {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .cem-summary-item {
        display: flex;
        justify-content: space-between;
        background: #f7f8fb;
        padding: 10px;
        border-radius: 8px;
        font-size: 14px;
    }

    /* Loader */
    .cem-loader-box {
        width: 90%;
        padding: 20px;
    }
}



.cem-summary_before{
    font-family:Dananum;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:16px;
    color:#033A88;
    margin-bottom:10px;
    /*position:relative;*/
}
/*.cem-summary_before::after{*/
/*    content:'';*/
/*    width:80%;*/
/*    border-bottom:1px dashed #033A88;*/
/*    display:block;*/
/*    position: absolute;*/
/*    bottom: 0px;*/
/*}*/


.cem-extra-form_before{
    font-family:Dananum;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    font-size:12px;
    color:#000;
    margin-bottom:15px;
}

.cem-extra-form_before_first{
    font-size:16px;
    color:#033A88;
}

.cem-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.cem-disabled .cem-price {
    color: #999;
}


.cem-extra-form {
    margin-bottom: 20px;
}

.cem-row input{
    font-family:Dananum;
}

.cem-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    /*margin-bottom: 12px;*/
}

.cem-row > * {
    flex: 1 1 calc(50% - 6px); /* دو ستون با فاصله 12px */
}

@media (max-width: 768px) {
    .cem-row > * {
        flex: 1 1 100%; /* یک ستون روی موبایل */
    }
}





/*.cem-banner-plans {*/
/*    display:flex;*/
/*    gap:20px;*/
/*    justify-content:center;*/
/*}*/

/*.cem-banner-card {*/
/*    width:240px;*/
/*    border-radius:12px;*/
/*    overflow:hidden;*/
/*    cursor:pointer;*/
/*    border:2px solid transparent;*/
/*}*/

/*.cem-banner-card.active {*/
/*    border-color:#033A88;*/
/*}*/

/*.cem-banner-preview img {*/
/*    width:100%;*/
/*    display:block;*/
/*    margin:20px auto;*/
/*}*/

