/**
 * استایل‌های سیستم اعلان‌ها با پیشوند pwa_notif_ برای جلوگیری از تداخل
 */

/* کانتینر اصلی */
.pwa_notif_container {
    position: relative;
    display: inline-block;
}

/* دکمه زنگوله اعلان‌ها */
.pwa_notif_bell {
    position: relative;
}

.pwa_notif_toggle {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    padding: 5px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.pwa_notif_toggle:hover {
    color: #0d6efd;
}

/* نشانگر تعداد اعلان‌های خوانده نشده */
.pwa_notif_badge_msg,
.pwa_notif_badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-weight: bold;
}

.pwa_notif_badge_msg {
    top: -10px;
}

/* دراپ‌داون اعلان‌ها */
.pwa_notif_dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 350px;
    max-width: 100vw;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.pwa_notif_dropdown.active {
    display: block;
    animation: pwa_notif_fadeIn 0.3s ease;
}

@keyframes pwa_notif_fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* هدر دراپ‌داون */
.pwa_notif_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.pwa_notif_header h5 {
    margin: 0;
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.pwa_notif_controls {
    display: flex;
    gap: 10px;
}

.pwa_notif_controls button {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pwa_notif_controls button:hover {
    background-color: #f0f0f0;
    color: #0d6efd;
}

/* بدنه دراپ‌داون */
.pwa_notif_body {
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

/* لیست اعلان‌ها */
.pwa_notif_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* آیتم اعلان */
.pwa_notif_item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.pwa_notif_item:hover {
    background-color: #f9f9f9;
}

.pwa_notif_item.unread {
    background-color: rgba(13, 110, 253, 0.05);
}

.pwa_notif_item.unread:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

.pwa_notif_item.unread:before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: #18384f;
}

/* آیکون اعلان */
.pwa_notif_icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    flex-shrink: 0;
}
.pwa_notif_workflow_status {
    margin-left: 15px;
}
.pwa_notif_bg_soft_success {
    background-color: rgba(25, 135, 84, 0.1);
}

.pwa_notif_bg_soft_warning {
    background-color: rgba(255, 193, 7, 0.1);
}

.pwa_notif_bg_soft_danger {
    background-color: rgba(220, 53, 69, 0.1);
}

.pwa_notif_bg_soft_info {
    background-color: rgba(13, 202, 240, 0.1);
}

.pwa_notif_bg_soft_primary {
    background-color: rgba(13, 110, 253, 0.1);
}

.pwa_notif_text_success {
    color: #198754;
}

.pwa_notif_text_warning {
    color: #ffc107;
}

.pwa_notif_text_danger {
    color: #dc3545;
}

.pwa_notif_text_info {
    color: #0dcaf0;
}

.pwa_notif_text_primary {
    color: #0d6efd;
}

/* محتوای اعلان */
.pwa_notif_content {
    flex-grow: 1;
    overflow: hidden;
}

.pwa_notif_item_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.pwa_notif_title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.pwa_notif_actions {
    display: flex;
    gap: 5px;
    margin-left: 10px;
    flex-shrink: 0;
}

.pwa_notif_actions button {
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.pwa_notif_actions button:hover {
    background-color: #f0f0f0;
    color: #333;
}

.pwa_notif_message {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pwa_notif_meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #aaa;
}

.pwa_notif_time {
    display: flex;
    align-items: center;
}

/* فوتر دراپ‌داون */
.pwa_notif_footer {
    padding: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.pwa_notif_btn_view_all {
    background: none;
    border: none;
    color: #0d6efd;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 5px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pwa_notif_btn_view_all:hover {
    background-color: rgba(13, 110, 253, 0.1);
}

/* پیام‌های خالی، بارگذاری و خطا */
.pwa_notif_empty,
.pwa_notif_loading,
.pwa_notif_error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 15px;
    text-align: center;
    color: #aaa;
}

.pwa_notif_empty i,
.pwa_notif_loading i,
.pwa_notif_error i {
    font-size: 24px;
    margin-bottom: 10px;
}

.pwa_notif_loading i {
    color: #0d6efd;
}

.pwa_notif_error i {
    color: #dc3545;
}

.pwa_notif_empty p,
.pwa_notif_loading p,
.pwa_notif_error p {
    margin: 0;
    font-size: 14px;
}

/* دکمه‌های اکشن */
.pwa_notif_action_buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: flex-end;
}

.pwa_notif_action_btn {
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.pwa_notif_btn_success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.pwa_notif_btn_success:hover {
    background-color: rgba(25, 135, 84, 0.2);
}

.pwa_notif_btn_danger {
    background-color: rgba(190, 19, 16, 0.1);
    color: #dc3545;
}

.pwa_notif_btn_danger:hover {
    background-color: rgba(190, 19, 16, 0.2);
}

.pwa_notif_btn_primary {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.pwa_notif_btn_primary:hover {
    background-color: rgba(13, 110, 253, 0.2);
}
.fs-7 {
    font-size: 14px !important;
}
/* پاسخگویی به اندازه صفحه */
@media (max-width: 576px) {
    .pwa_notif_dropdown {
        width: 300px;
        right: -100px;
    }
}

/* استایل برای فرم‌های اکشن */
.pwa_notif_form {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
}

.pwa_notif_form_title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.pwa_notif_date_options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.pwa_notif_date_option {
    display: flex;
    gap: 10px;
}

.pwa_notif_date_input_group,
.pwa_notif_time_input_group {
    flex: 1;
}

.pwa_notif_date_input_group label,
.pwa_notif_time_input_group label {
    display: block;
    font-size: 12px;
    margin-bottom: 5px;
    color: #666;
}

.pwa_notif_date_picker,
.pwa_notif_time_picker {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.pwa_notif_form_actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.pwa_notif_btn {
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.pwa_notif_form_error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pwa_notif_processing,
.pwa_notif_success,
.pwa_notif_error {
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.pwa_notif_processing {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.pwa_notif_success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.pwa_notif_error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* استایل برای گزینه‌های رادیویی */
.pwa_notif_date_radio_options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.pwa_notif_date_radio_option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa_notif_date_radio_option:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

.pwa_notif_date_radio_option input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.pwa_notif_date_radio_option label {
    display: flex;
    flex-grow: 1;
    justify-content: space-between;
    cursor: pointer;
    margin: 0;
}

.pwa_notif_proposed_date,
.pwa_notif_proposed_time {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #333;
}

.pwa_notif_date_radio_option input[type="radio"]:checked + label {
    font-weight: 600;
    color: #0d6efd;
}

.pwa_notif_date_radio_option input[type="radio"]:checked + label .pwa_notif_proposed_date,
.pwa_notif_date_radio_option input[type="radio"]:checked + label .pwa_notif_proposed_time {
    color: #0d6efd;
}

/* استایل برای اعلان‌های نیازمند اکشن */
.pwa_notif_item.action-required {
    border-right: 3px solid #dc3545;
}

.pwa_notif_action_badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-radius: 4px;
    font-size: 11px;
    margin-left: 10px;
}

/* استایل برای وضعیت اعلان */
.pwa_notif_status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 10px;
}

.pwa_notif_status_approved {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.pwa_notif_status_rejected {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* استایل‌های مربوط به مودال همه نوتیفیکیشن‌ها */
.pwa_all_notif_container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pwa_all_notif_tabs {
    display: flex;
    margin-bottom: 10px;
}

.pwa_all_notif_tab {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    color: #6c757d;
    position: relative;
}

.pwa_all_notif_list {
    flex-grow: 1;
    overflow-y: auto;
    max-height: 500px;
}

.pwa_all_notif_pagination {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.pwa_pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pwa_pagination_item {
    margin: 0 2px;
}

.pwa_pagination_btn {
    padding: 5px 10px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    cursor: pointer;
    color: #007bff;
    border-radius: 3px;
}

.pwa_pagination_item.active .pwa_pagination_btn {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pwa_pagination_item.disabled .pwa_pagination_btn {
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* استایل برای نشانگر نیاز به اقدام */
.pwa_notif_action_required_badge {
    display: inline-block;
    padding: 2px 6px;
    background-color: #ffc107;
    color: #212529;
    border-radius: 3px;
    font-size: 0.7rem;
}

@media (max-width: 768px) {
  .pwa_notif_dropdown {
    position: fixed;
    top: 60px; /* یا هر موقعیت مناسب زیر هدر */
    left: 10px;
    right: 10px;
    width: auto;
    max-width: calc(100% - 20px);
    border-radius: 8px;
    background: white;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow: hidden;
    margin-top: 0;
    transition: all 0.3s ease;
  }
  .pwa_all_notif_list {
      max-height: 64vh !important;
  }
  .pwa_all_notif_tabs {
    margin-bottom: 0;
  }

}

/* نشانگر "در انتظار انتخاب" */
.pwa_notif_waiting_badge {
    display: inline-flex;
    align-items: center;
    background-color: #ffeaa7;
    color: #d63031;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
}

.pwa_notif_waiting_badge i {
    margin-left: 4px;
    font-size: 10px;
}

/* استایل برای نوتیفیکیشن‌های در انتظار انتخاب */
.pwa_notif_item.workflow-waiting_selection {
    border-left: 3px solid #fdcb6e;
    background: linear-gradient(135deg, #ffeaa7 0%, transparent 100%);
}

.pwa_notif_item.workflow-waiting_selection .pwa_notif_icon {
    background-color: rgba(253, 203, 110, 0.2);
}

.pwa_notif_item.workflow-waiting_selection .pwa_notif_title {
    color: #d63031;
}

/* تنظیمات responsive برای نشانگرها */
@media (max-width: 768px) {
    .pwa_notif_waiting_badge {
        font-size: 10px;
        padding: 1px 6px;
    }
    
    .pwa_notif_waiting_badge i {
        font-size: 9px;
    }
}

/* حالت hover برای نوتیفیکیشن‌های در انتظار */
.pwa_notif_item.workflow-waiting_selection:hover {
    background: linear-gradient(135deg, #fdcb6e 0%, transparent 100%);
    box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
}

/* استایل برای نوتیفیکیشن‌های تکمیل شده */
.pwa_notif_item.workflow-completed {
    opacity: 0.8;
    border-left: 3px solid #00b894;
}

.pwa_notif_item.workflow-completed .pwa_notif_completed_badge {
    background-color: #00b894;
    color: white;
}

/* استایل برای نوتیفیکیشن‌های لغو شده */
.pwa_notif_item.workflow-canceled {
    opacity: 0.7;
    border-left: 3px solid #e17055;
}

.pwa_notif_item.workflow-canceled .pwa_notif_title {
    text-decoration: line-through;
    color: #636e72;
}