/* Classic Alert Styles */
.classic-alert-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.1);
  z-index: 300000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.classic-alert-box {
  background: #e4e4e4;
  border: 1px solid #000;
  width: 320px;
  max-width: 90%;
  text-align: center;
  direction: rtl;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  position: relative;
  padding: 30px 15px 15px 15px;
  border-radius: 3px;
  animation: popIn 0.15s ease-out;
}
.classic-alert-header {
  background: #2b3b4e;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  border: 1px solid #000;
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 25px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  white-space: nowrap;
  text-shadow: none !important;
  z-index: 10;
}
.classic-alert-header-error {
  background: #dc3545 !important;
}
.classic-alert-header-success {
  background: #28a745 !important;
}
.classic-alert-header-warning {
  background: #ffc107 !important;
  color: #000 !important;
}
.classic-alert-header-question {
  background: #17a2b8 !important;
}
.classic-alert-body {
  font-family: var(--font-family);
  font-size: var(--font-size);
  font-weight: var(--font-weight);
  color: #000;
  line-height: 1.5;
  margin-bottom: 15px;
  text-shadow: none !important;
}
.classic-alert-buttons button {
  font-family: var(--font-family);
  font-weight: var(--font-weight);
  border-radius: 3px;
  padding: 4px 20px;
  border: 1px solid #000;
  background: #2b3b4e;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}
.classic-alert-buttons button:hover {
  background: #1a252f;
}
.classic-alert-buttons .btn-secondary {
  background: #6c757d;
}
.classic-alert-buttons .btn-secondary:hover {
  background: #5a6268;
}
@keyframes popIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Hide original SweetAlert when classic alert is active */
body.classic-alert-active .swal2-container:not(.swal2-toast-container) {
  display: none !important;
}

/* Private Alert Popup Styles */
.private-alert-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

.private-alert-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #2b3b4e;
  padding: 10px 14px;
  border-radius: 6px;
  direction: rtl;
  text-align: right;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.private-alert-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  flex-shrink: 0;
}

.private-alert-name {
  color: #fff !important;
  font-weight: bold;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.private-alert-textarea-wrapper {
  position: relative;
  width: 100%;
  direction: rtl;
}

.private-alert-textarea {
  width: 100%;
  height: 100px;
  resize: none !important;
  border: 1px solid #bbb;
  border-radius: 6px;
  padding: 8px;
  font-size: 14px;
  direction: rtl;
  text-align: right;
  outline: none;
  background: #fff;
  color: #000;
  box-sizing: border-box;
}

.private-alert-textarea:focus {
  border-color: #2b3b4e;
}

.private-alert-char-counter {
  text-align: left;
  font-size: 11px;
  color: #666;
  margin-top: 2px;
  padding-left: 4px;
  font-family: monospace;
}

.private-alert-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 4px;
  direction: rtl;
}

.private-alert-btn-emoji {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  padding: 0;
  outline: none;
}

.private-alert-btn-emoji:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

.private-alert-btn-emoji img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Custom Emoji/Sticker Picker Box */
.private-alert-picker {
  display: none;
  flex-direction: column;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fdfdfd;
  margin-top: 8px;
  height: 240px;
  overflow: hidden;
  box-sizing: border-box;
}

.private-alert-picker.is-open {
  display: flex;
}

.private-alert-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #eee;
  padding: 4px 8px;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
  direction: rtl;
}

.private-alert-picker-tabs {
  display: flex;
  gap: 8px;
}

.private-alert-tab-btn {
  background: none;
  border: none;
  padding: 4px 12px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
  color: #555;
  font-weight: 500;
}

.private-alert-tab-btn.active {
  background: #2b3b4e;
  color: #fff;
}

.private-alert-picker-close {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 2px 6px;
}

.private-alert-picker-close:hover {
  color: #333;
}

.private-alert-picker-content {
  flex-grow: 1;
  overflow-y: auto;
  padding: 8px;
  direction: rtl;
}

/* Scrollbar inside the custom picker content */
.private-alert-picker-content::-webkit-scrollbar {
  width: 6px;
}
.private-alert-picker-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}
.private-alert-picker-content::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
.private-alert-picker-content::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Grids for smileys and stickers */
.private-alert-smileys-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}

.private-alert-stickers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.private-alert-picker-item {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.1s;
  padding: 4px;
  border: 1px solid transparent;
}

.private-alert-picker-item:hover {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.private-alert-picker-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.private-alert-picker-item.smiley img {
  width: 28px;
  height: 28px;
}

.private-alert-picker-item.sticker img {
  width: 48px;
  height: 48px;
}
