/* =========================
   فونت و استایل مودال
========================= */
@font-face {
    font-family: 'iransans';
    src: url('../fonts/IRANSans.woff2') format('woff2'),
         url('../fonts/IRANSans.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

.crf-modal, .crf-message-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    font-family: 'iransans', sans-serif;
    background-color: rgba(0,0,0,0.5);
}

.crf-modal-content, .crf-message-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 520px;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.crf-close, .crf-message-close {
    position: absolute;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.crf-close { left: 15px; top: 10px; }
.crf-close:hover { color: #f00; }
.crf-message-close { left: 20px; top: 14px; }

.crf-modal form {
    display: flex;
    flex-direction: column;
}

.crf-modal label {
    margin-top: 12px;
    font-weight: bold;
}

.crf-modal input,
.crf-modal textarea,
.crf-modal select,
.crf-input {
    padding: 8px !important;
    margin-top: 4px !important;
    border-radius: 6px !important;
    border: 1px solid #ccc !important;
    font-size: 14px !important;
    width: 100% !important;
    font-family: 'iransans', sans-serif !important;
    background: #fff !important;
    color: #333 !important;
    box-sizing: border-box !important;
}


.crf-modal textarea {
    resize: vertical;
    min-height: 80px;
}

.crf-modal button[type="submit"],
.crf-btn {
    margin-top: 15px;
    padding: 10px;
    background-color: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
    font-family: 'iransans', sans-serif !important;

}

.crf-modal button[type="submit"]:hover,
.crf-btn:hover { background-color: #005a8c; }

#openReportForm {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #f39c12;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

#openReportForm:hover {
    background-color: #e67e22;
}

/* =========================
   کارت گزارش
========================= */
.crf-report-card {
    background:#fff8f0;
    border:1px solid #f0c99a;
    border-radius:12px;
    padding:14px 18px;
    margin-bottom:12px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    transition:transform 0.2s;
    font-family: 'iransans', sans-serif;
    font-size: 18px;

}
.crf-report-card:hover{ transform:translateY(-2px); }

.crf-report-card .crf-buttons {
    display:flex;
    gap:6px;
}

.crf-report-card button{
    padding:6px 14px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    font-weight:bold;
    transition:background 0.3s;
    color:#fff;
    font-family: 'iransans', sans-serif;

}

.crf-view-report{
    background:#3498db;
}
.crf-view-report:hover{ background:#2980b9; }

.crf-delete-report{
    background:#e74c3c;
}
.crf-delete-report:hover{ background:#c0392b; }

/* =========================
   مودال پیام
========================= */
.crf-message-header {
    font-size:18px;
    font-weight:bold;
    color:#3498db;
    margin-bottom:8px;
    font-family: 'iransans', sans-serif;

}
.crf-message-sub {
    font-size:14px;
    color:#555;
    margin-bottom:10px;
    font-family: 'iransans', sans-serif;

}
.crf-message-body {
    font-size:16px;
    line-height:1.6;
    background:#f5f7fa;
    padding:12px;
    border-radius:6px;
    font-family: 'iransans', sans-serif;

}
.crf-message-sub p { margin:4px 0;     font-size:16px;
}
.crf-bullet {
    display:inline-block;
    width:8px;
    height:8px;
    margin-left:6px;
    background:#3498db;
    border-radius:50%;
    font-family: 'iransans', sans-serif;

}

/* =========================
   پیام موفقیت
========================= */
.crf-success-message {
    display: none;
    background-color: #27ae60;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    transition: all 0.3s ease;
    font-family: 'iransans', sans-serif;

}
.crf-success-message.show {
    display: block;
    animation: crf-fadein 0.3s ease;
}
@keyframes crf-fadein {
    from {opacity: 0; transform: translateY(-10px);}
    to   {opacity: 1; transform: translateY(0);}
}

/* =========================
   صفحه تنظیمات
========================= */
/* ---------- تنظیمات کلی ---------- */
/* ---------- تنظیمات کلی ---------- */
.crf-settings-wrap * { box-sizing: border-box; font-family: 'iransans', sans-serif; }

/* ---------- تب‌ها ---------- */
.crf-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
/* تب‌ها رنگی رنگی */
.crf-tab-btn {
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    transition: all 0.2s ease;
    color: #fff;
    font-family: 'iransans', sans-serif;

}

/* رنگ‌های پایه برای تب‌ها */
.crf-tab-btn.tab-color-1 { background: #e74c3c; }  /* قرمز */
.crf-tab-btn.tab-color-2 { background: #3498db; }  /* آبی */
.crf-tab-btn.tab-color-3 { background: #27ae60; }  /* سبز */
.crf-tab-btn.tab-color-4 { background: #f39c12; }  /* نارنجی */
.crf-tab-btn.tab-color-5 { background: #9b59b6; }  /* بنفش */
.crf-tab-btn.tab-color-6 { background: #1abc9c; }  /* فیروزه‌ای */
.crf-tab-btn.tab-color-7 { background: #e67e22; }  /* نارنجی پررنگ */
.crf-tab-btn.tab-color-8 { background: #c0392b; }  /* قرمز تیره */
.crf-tab-btn.tab-color-9 { background: #2980b9; }  /* آبی تیره */
.crf-tab-btn.tab-color-10 { background: #8e44ad; } /* بنفش تیره */

/* حالت hover */
.crf-tab-btn:hover { filter: brightness(1.1); }

/* تب فعال */
.crf-tab-btn.active {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* gradient برای تب فعال */
.crf-tab-btn.tab-color-1.active { background: linear-gradient(135deg,#e74c3c,#c0392b); }
.crf-tab-btn.tab-color-2.active { background: linear-gradient(135deg,#3498db,#2980b9); }
.crf-tab-btn.tab-color-3.active { background: linear-gradient(135deg,#27ae60,#1e8449); }
.crf-tab-btn.tab-color-4.active { background: linear-gradient(135deg,#f39c12,#d35400); }
.crf-tab-btn.tab-color-5.active { background: linear-gradient(135deg,#9b59b6,#8e44ad); }
.crf-tab-btn.tab-color-6.active { background: linear-gradient(135deg,#1abc9c,#16a085); }
.crf-tab-btn.tab-color-7.active { background: linear-gradient(135deg,#e67e22,#d35400); }
.crf-tab-btn.tab-color-8.active { background: linear-gradient(135deg,#c0392b,#962d22); }
.crf-tab-btn.tab-color-9.active { background: linear-gradient(135deg,#2980b9,#1f618d); }
.crf-tab-btn.tab-color-10.active { background: linear-gradient(135deg,#8e44ad,#71368a); }

.crf-tab-content {
    display: none;
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 0 5px 5px 5px;
    margin-bottom: 20px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    animation: crf-fadein 0.3s ease;
    font-family: iransans;
}
.wrap h1{
    font-family: 'iransans', sans-serif;
}
.crf-settings-wrap h3 {
    font-family: 'iransans', sans-serif;
    font-weight: 600; /* دلخواه */
    font-size: 15px;  /* می‌تونی تغییر بدی */
    color: #234;      /* رنگ فعلی */
    margin-bottom: 10px;
}

/* ---------- input های متنی ---------- */
.crf-tab-content input[type="text"],
.crf-tab-content input[type="number"],
.crf-tab-content select,
.crf-tab-content textarea {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #cfd6df;
    border-radius: 8px;
    background: #fdfdfd;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.2s;
    font-family: 'iransans', sans-serif;

}
.crf-tab-content input[type="text"]:focus,
.crf-tab-content input[type="number"]:focus,
.crf-tab-content select:focus,
.crf-tab-content textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 6px rgba(52,152,219,0.3);
}

/* ---------- چک‌باکس ---------- */
.crf-tab-content input[type="checkbox"] {
    width: auto;
    margin-right: 6px;
    transform: scale(1.1);
}

/* ---------- دکمه‌ها ---------- */
.crf-btn, .crf-add-field, .crf-remove-field {
    display: inline-block;
    padding: 8px 14px;
    margin-top: 5px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.crf-btn:hover,
.crf-add-field:hover,
.crf-remove-field:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}
.crf-remove-field {
    background: #e74c3c;
}
.crf-remove-field:hover {
    background: #c0392b;
}

/* ---------- فیلدهای دلخواه ---------- */
.crf-custom-field {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px;
    background: #f9f9f9;
    border: 1px solid #e3ebf3;
    border-radius: 10px;
}
.crf-custom-field input[type="text"] { flex: 1; }
.crf-custom-field select { flex: 0 0 120px; }

/* ---------- Shortcodes ---------- */
.crf-shortcodes {
    margin-top: 20px;
    background: #f7f7f7;
    padding: 10px;
    border-radius: 5px;
}
.crf-shortcode,
.crf-shortcode-php {
    width: 100%;
    padding: 6px;
    margin-bottom: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: monospace;
    background: #fff;
}

/* ---------- انیمیشن ---------- */
@keyframes crf-fadein {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}


/* ---------- عناوین و لیبل‌ها ---------- */
.crf-tab-content h2, .crf-tab-content h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-family: iransans;
}

.crf-tab-content label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: #34495e;
    font-family: iransans;
}

/* =========================
   دکمه‌ها و inline
========================= */
.crf-btn.danger { background:#e74c3c; }
.crf-inline { display:flex; align-items:flex-end; gap:18px; flex-wrap:wrap; }
.crf-inline-item { display:flex; flex-direction:column; gap:6px; }

/* =========================
   فرم اصلی
========================= */
.crf-main-form { margin-top:8px; }
.crf-section { margin-top:14px; }
.crf-section h3 { margin: 0 0 10px 0; font-size:15px; color:#234; }

.crf-card {
    background: linear-gradient(135deg, #eef4fb, #f7f9fc);
    border: 1px solid #d7e1ec;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 18px rgba(17, 34, 64, 0.06);
}
.crf-card-header { margin-bottom:6px; }
.crf-card-title { font-size:18px; font-weight:700; color:#2c3e50; }
.crf-card-subtitle { font-size:12px; color:#6b7c93; }


/* دکمه باز کردن فرم کاملاً ایزوله */
#openReportForm_1,
[id^="openReportForm_"] {
    all: unset; /* تمام استایل‌های قالب حذف شوند */
    display: inline-block;
    padding: 10px 20px;
    font-family: 'iransans', sans-serif;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    color: #fff; /* رنگ متن ثابت */
    transition: background 0.3s, transform 0.1s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* رنگ دکمه از inline style یا PHP گرفته میشه، پس فقط hover رو اضافه میکنیم */
#openReportForm_1:hover,
[id^="openReportForm_"]:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}


/* --- فرم inline مشابه مودال --- */
.crf-inline-form {
    background: #fff8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px;
    max-width: 600px;
    margin: 20px auto;
    font-family: 'iransans', sans-serif;
    color: #e67e22;
}

.crf-inline-form h2 {
    background: linear-gradient(90deg,#ffb366,#ffc299);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 20px;
    margin-bottom: 15px;
    font-family: 'iransans', sans-serif;
    
}

.crf-inline-form label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

.crf-inline-form input,
.crf-inline-form textarea {
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border: 1px solid #e0c8b0;
    border-radius: 6px;
    background: #fff;
    color: #333;
    font-size: 14px;
    box-sizing: border-box;
    font-family: 'iransans', sans-serif;
}

.crf-inline-form button[type="submit"] {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #d35400;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    font-family: 'iransans', sans-serif;
}

.crf-inline-form button[type="submit"]:hover {
    background-color: #e67e22;
}

.crf-inline-form .crf-success-message {
    text-align: center;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
    display: none;
}





/* === Wrapper کلی === */
.crf-settings-wrap {
    font-family: IRANSans, sans-serif;
    max-width: 80%;
    margin: 20px auto;
    background: #fff;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
}

/* === Accordion === */
.crf-form-accordion {
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #ddd;
}
.crf-accordion-btn {
    width: 100%;
    text-align: right;
    padding: 12px 20px;
    background: #3498db;
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    border-radius: 10px;
    transition: background 0.3s;
}
.crf-accordion-btn:hover {
    background: #2980b9;
}
.crf-accordion-content {
    padding: 15px 20px;
    display: none;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    border-radius: 0 0 10px 10px;
}

/* === گروه فیلدها === */
.crf-field-group {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}
.crf-field-group label {
    width: 100%;
    font-weight: bold;
    margin-bottom: 5px;
}
.crf-field-group input[type="text"],
.crf-field-group input[type="color"],
.crf-field-group select,
.crf-field-group textarea {
    flex: 1 1 250px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}
.crf-field-group input[type="text"]:focus,
.crf-field-group input[type="color"]:focus,
.crf-field-group select:focus,
.crf-field-group textarea:focus {
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52,152,219,0.3);
}

/* === فیلدهای دلخواه === */
.crf-custom-fields-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.crf-custom-field {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.crf-custom-field button.crf-remove-field {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}
.crf-custom-field button.crf-remove-field:hover {
    background: #c0392b;
}

/* === دکمه افزودن فیلد === */
.crf-add-field {
    margin-top: 10px;
    background: #2ecc71;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}
.crf-add-field:hover {
    background: #27ae60;
}

/* === شورتکدها === */
.crf-shortcodes input {
    width: 100%;
    margin-bottom: 8px;
    cursor: pointer;
    background: #ecf0f1;
}
.crf-shortcodes label {
    font-weight: bold;
    margin-top: 10px;
}

/* === دکمه‌های ایجاد فرم و ذخیره === */
.crf-buttons-group {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 20px;
}
.crf-buttons-group .button {
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: bold;
    transition: all 0.3s;
}
.crf-buttons-group .button-primary {
    background: #3498db;
    color: #fff;
}
.crf-buttons-group .button-primary:hover {
    background: #2980b9;
}
.crf-buttons-group .button:hover {
    background: #ddd;
}



