:root {
  --primary-font: "Cairo", sans-serif;
  --primary-color: #0074d9;
  --secondary-color: #0868ff;
  --button-hover: #0054de;
  --gold-color: #ffb830;
  --text-gray: #9193a8;
  --background: #d7dde5;
  --light-color: #f4f8fb;
  --success: #28c72f;
  --animation-duration: 0.5s;
}

* {
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  box-sizing: border-box;
}

body {
  background-color: var(--background);
}

.container {
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.main-text-h1 {
  text-align: center;
  color: var(--light-color);
}

.form-group {
  margin-bottom: 20px;
}

label {
  font-weight: bold;
  display: block;
  margin-top: 15px;
  margin-bottom: 5px;
}

input[type="text"],
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

select {
  appearance: none;
}

button {
  padding: 10px 20px;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

.image-preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.preview-image {
  max-width: 100px;
  max-height: 100px;
  margin-right: 10px;
  margin-bottom: 10px;
}

.wrapper {
  background-color: var(--primary-color);
  padding: 14px;
  border-radius: 15px;
}

/* normal */

.container.locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.container.locked img {
  max-width: 200px; /* Adjust image width as needed */
  margin-bottom: 20px; /* Add some space between image and paragraph */
}

.container.locked p {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 17px;
}

.avatar-container {
  position: relative;
  display: inline-block;
}

.avatar {
  width: 40px;
  cursor: pointer;
  height: 40px;
  border-radius: 50%;
  top: 10px;
  position: relative;
}

.active-indicator {
  position: absolute;
  bottom: -5px;
  right: -5px;
  width: 12px;
  height: 12px;
  background-color: #4caf50; /* Green color */
  border-radius: 50%;
  animation: glow 1s infinite alternate; /* Glowing effect */
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px #4caf50;
  }
  100% {
    box-shadow: 0 0 15px #4caf50;
  }
}

.username-box {
  position: absolute;
  cursor: pointer;
  bottom: -45px;
  left: calc(100% + -87px);
  background: var(--secondary-color);
  color: #fff;
  padding: 5px;
  border-radius: 5px;
  display: none;
  font-size: 15px;
  white-space: nowrap; /* Prevent text from wrapping */
  overflow: hidden; /* Hide any overflow text */
  text-overflow: ellipsis; /* Show ellipsis (...) if text overflows */
}

.avatar-container:hover .username-box {
  display: block;
  animation: slide-in 0.3s ease forwards;
}

/* Navbar */
.navbar {
  background: linear-gradient(to right, #1d4ed8, #1e40af); /* Blue gradient */
  color: white;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Shadow */
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem;
}

.navbar-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-title {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: -0.05em;
}

.active-account {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: bold;
  background-color: rgba(59, 130, 246, 0.5);
  color: white;
}

.blue-text {
  color: #93c5fd;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-link {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  transition: background-color 0.2s;
  color: white;
  text-decoration: none;
}

.navbar-link:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.navbar-link i {
  margin-right: 0.5rem;
}

#mobileMenu {
  display: none;
}

.mobile-item {
  background-color: #3b82f6;
  padding: 1rem;
  margin-bottom: 15px;
  border-radius: 0.5rem;
}

.mobile-item a {
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.mobile-item i {
  margin-right: 0.5rem;
}

/* Burger Button */
.burger-button {
  display: none;
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: rgba(59, 130, 246, 0.7);
  font-weight: bold;
  background: transparent;
  border: none;
}

.burger-icon {
  height: 24px;
  width: 24px;
}

/* Media Queries */
@media (max-width: 767px) {
  .navbar-right {
    display: none;
  }

  .burger-button {
    display: block;
  }

  .mobile-menu {
    display: block;
    gap: 1rem;
    margin-top: 1rem;
  }
}

@media (min-width: 768px) {
  .hidden-md {
    display: none;
  }
}

html {
  direction: rtl;
}

body,
button,
input,
select,
textarea {
  font-family: "IBM Plex Sans Arabic", sans-serif;
}

@media screen and (max-width: 768px) {
  .active-account {
    display: none;
  }
}

input,
textarea,
select {
  font-size: 16px;
}

.certificates-container {
  margin: 20px 0;
}

.certificates-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.certificate-item {
  position: relative;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
}

.certificate-preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.delete-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 0, 0, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.delete-btn:hover {
  background: rgba(255, 0, 0, 1);
}

.upload-certificate,
.upload-cv {
  margin-top: 20px;
  text-align: center;
}

.upload-label {
  display: inline-block;
  padding: 10px 20px;
  background: #f0f0f0;
  border: 2px dashed #ddd;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 10px;
}

.upload-label:hover {
  background: #e0e0e0;
}

.upload-btn {
  background: #0074d9;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
}

.upload-btn:hover {
  background: #0056b3;
}

.cv-container {
  margin: 20px 0;
}

.cv-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
}

.cv-preview i {
  font-size: 24px;
  color: #0074d9;
}

/* RTL specific adjustments */
.navbar-right {
  margin-left: 0;
  margin-right: auto;
}

.navbar-left {
  margin-right: 0;
  margin-left: auto;
}

.ml-2 {
  margin-left: 0.5rem !important;
  margin-right: 0 !important;
}

.mr-2 {
  margin-right: 0.5rem !important;
}

.space-x-4 > * + * {
  margin-left: 0;
  margin-right: 1rem;
}

.space-x-3 > * + * {
  margin-left: 0;
  margin-right: 0.75rem;
}

.space-x-2 > * + * {
  margin-left: 0;
  margin-right: 0.5rem;
}

.pr-3 {
  padding-right: 0 !important;
  padding-left: 0.75rem !important;
}

.pr-10 {
  padding-right: 0 !important;
  padding-left: 2.5rem !important;
}

.pl-4 {
  padding-left: 0 !important;
  padding-right: 1rem !important;
}

.right-0 {
  right: auto;
  left: 0;
}

.inset-y-0.right-0 {
  right: auto;
  left: 0;
}

.text-right {
  text-align: right;
}

.flex-row-reverse {
  flex-direction: row;
}

/* Fix icon spacing in buttons and links */
.navbar-link i,
button i {
  margin-left: 0;
  margin-right: 0;
}

/* Add proper spacing for RTL direction */
.navbar-link,
button {
  display: flex;
  align-items: center;
}

/* Fix section headers spacing */
.flex.items-center.space-x-3 {
  display: flex;
  direction: rtl;
}

.flex.items-center.space-x-3 i {
  margin-left: 0.75rem;
}

/* Override Tailwind space utilities for RTL */
.space-x-2 > * + *,
.space-x-3 > * + *,
.space-x-4 > * + * {
  margin-left: 0;
}

/* Mobile menu RTL fixes */
.mobile-item a {
  display: flex;
  align-items: center;
}

/* Add confirmation dialog styles */
.confirmation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.confirmation-dialog {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  width: 90%;
  max-width: 450px;
  padding: 0;
  overflow: hidden;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.confirmation-dialog.active {
  transform: translateY(0);
  opacity: 1;
}

.confirmation-header {
  background-color: #f8f9fa;
  padding: 20px;
  border-bottom: 1px solid #eaeaea;
  display: flex;
  align-items: center;
}

.confirmation-icon {
  background-color: #fee2e2;
  color: #dc2626;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-left: 15px;
}

.confirmation-title {
  flex: 1;
}

.confirmation-title h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.confirmation-title p {
  margin: 5px 0 0;
  font-size: 14px;
  color: #6b7280;
}

.confirmation-body {
  padding: 20px;
}

.confirmation-message {
  font-size: 15px;
  color: #4b5563;
  margin-bottom: 20px;
}

.confirmation-image {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.confirmation-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #eaeaea;
}

.btn-cancel {
  background-color: #f3f4f6;
  color: #4b5563;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-cancel:hover {
  background-color: #e5e7eb;
}

.btn-delete {
  background-color: #dc2626;
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
}

.btn-delete i {
  margin-left: 6px;
}

.btn-delete:hover {
  background-color: #b91c1c;
}
