#change-pic-btn {
  width: 190px;
  height: 0px;
  font-size: 13px;
  padding: 0px;
  background-color: white;
  color: black;
  text-decoration: underline;
}

#change-name-btn {
  width: 50px;
  height: 0px;
  font-size: 13px;
  padding: 0px;
  background-color: white;
  color: black;
  text-decoration: underline;

}

#change-email-btn {
  width: 50px;
  height: 0px;
  font-size: 13px;
  padding: 0px;
  background-color: white;
  color: black;
  text-decoration: underline;
}

#change-address-btn {
  width: 90px;
  height: 0px;
  font-size: 13px;
  padding: 0px;
  background-color: white;
  color: black;
  text-decoration: underline;
}

#change-pass-btn {
  width: 50px;
  height: 0px;
  font-size: 13px;
  padding: 0px;
  background-color: white;
  color: black;
  text-decoration: underline;

}

#saveaddress,
.save {
  display: none;
  margin-left: 43%;
}


#change-location-btn {
  display: none;
  margin-left: 34.5%;
}

/* #city{
    display:none;

  } */


button {
  background-color: var(--zara-black, #000000);
  border: none;
  color: var(--zara-white, #ffffff);
  padding: 10px 20px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  /* Increased from 12px */
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 0;
  transition: opacity 0.3s ease;
  font-family: "Montserrat", sans-serif;
}

button:hover {
  opacity: 0.8;
}

/*for the center picture*/
#profilepageimg {
  display: block;
  margin: 20px;
  margin-left: 70px;

  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0px 0px 10px #888888;
}

/*for the changing img and save buttom*/
.file-input-label {

  display: inline-block;
  background-color: #f2f2f2;
  color: #555;
  padding: 10px 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.file-input-label:hover {
  background-color: #e0e0e0;
}

.file-input {
  display: none;
}

.file-input+span:before {
  content: "\f093";
  font-family: FontAwesome;
  margin-right: 10px;
}


/*for the teacher profile image view */
.user-img {
  display: block;
  margin: 0px;
  margin-bottom: 20px;

  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0px 0px 10px #888888;
}

.profilecontainer {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  border: none;
  background-color: var(--zara-white, #ffffff);
  font-family: "Montserrat", sans-serif;
}

h1 {
  text-align: center;
  color: var(--zara-text, #1a1a1a);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--zara-border, #e5e5e5);
  font-family: "Montserrat", sans-serif;
}

label {
  display: block;
  margin-bottom: 10px;
}

input[type=text],
input[type=email],
input[type=password],
input[type=file] {
  width: 50%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid var(--zara-border, #e5e5e5);
  border-radius: 0;
  box-sizing: border-box;
  margin-left: 25%;
  margin-right: 25%;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--zara-text, #1a1a1a);
  background-color: var(--zara-white, #ffffff);
  transition: border-color 0.3s ease;
}

input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus {
  outline: none;
  border-color: var(--zara-black, #000000);
}

input[type=submit] {
  background-color: #c3b78f;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

form {
  text-align: center;
}

.profilecontainer {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: var(--zara-white, #ffffff);
  display: flow-root;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: start;
  margin-top: 0px;
  margin-bottom: 80px;
  font-family: "Montserrat", sans-serif;
}

@media (max-width: 768px) {
  .profilecontainer {
    padding: 30px 20px !important;
    margin-top: 80px !important;
    margin-bottom: 60px !important;
  }
}

@media (max-width: 480px) {
  .profilecontainer {
    padding: 20px 15px !important;
    margin-top: 70px !important;
    margin-bottom: 50px !important;
  }
}

hr {
  width: 100%;
  margin: 30px 0;
  border: none;
  border-top: 1px solid var(--zara-border, #e5e5e5);
}


@media screen and (max-width: 768px) {
  .file-input-label {
    display: block;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 609px) {
  #change-location-btn {
    width: 100%;
    margin: 10px 0;
  }

  #saveaddress,
  .save {
    width: 100%;
    margin: 10px 0;
  }

  #city {
    width: 100%;
    margin: 10px 0;
  }

  input[type=text],
  input[type=email],
  input[type=password],
  input[type=file] {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px 0;
    border: 1px solid var(--zara-border, #e5e5e5);
    border-radius: 0;
    box-sizing: border-box;
  }
}


*:lang(ar) {
  text-align: center;
}

/* ========================================
   ENHANCED TABLE STYLING FOR PROFILE CONTAINER
   ======================================== */

/* Main table container and wrapper */
.profilecontainer table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  margin: 30px 0 !important;
  font-size: 15px !important;
  border: none !important;
  background: transparent !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background-color: #ffffff !important;
}

/* Table header styling - support both thead and direct th */
.profilecontainer table thead {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

.profilecontainer table th {
  padding: 20px 18px !important;
  text-align: left !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  /* Increased from 14px */
  color: #2c3e50 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  border-bottom: 2px solid #dee2e6 !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  letter-spacing: 0.3px !important;
  text-transform: uppercase !important;
  font-size: 13px !important;
  /* Increased from 12px */
  white-space: nowrap !important;
}

/* Style th in first row when no thead exists */
.profilecontainer table tr:first-child th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

.profilecontainer table th:first-child {
  padding-left: 24px !important;
}

.profilecontainer table th:last-child {
  padding-right: 24px !important;
}

/* Table body styling */
.profilecontainer table tbody {
  background-color: #ffffff !important;
}

.profilecontainer table td {
  padding: 20px 18px !important;
  border: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--zara-border, #e5e5e5) !important;
  color: var(--zara-text, #1a1a1a) !important;
  background: transparent !important;
  background-color: transparent !important;
  transition: background-color 0.2s ease !important;
  vertical-align: middle !important;
  line-height: 1.6 !important;
  font-family: "Montserrat", sans-serif !important;
  font-size: 14px !important;
  font-weight: 300 !important;
}

.profilecontainer table td strong {
  font-weight: 400 !important;
  color: var(--zara-text, #1a1a1a) !important;
  font-family: "Montserrat", sans-serif !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  font-size: 13px !important;
  /* Increased from 12px */
}

/* Default LTR padding (overridden by RTL rules below) */
.profilecontainer table td:first-child {
  padding-left: 24px !important;
  text-align: left !important;
}

.profilecontainer table td:last-child {
  padding-right: 24px !important;
}

/* RTL/LTR Support for tables - scoped to table only */
.profilecontainer table[dir="rtl"] {
  direction: rtl !important;
}

.profilecontainer table[dir="rtl"] td {
  text-align: right !important;
  direction: rtl !important;
}

.profilecontainer table[dir="rtl"] td:first-child {
  text-align: right !important;
  padding-right: 24px !important;
  padding-left: 18px !important;
}

.profilecontainer table[dir="rtl"] td:last-child {
  text-align: right !important;
  padding-left: 24px !important;
  padding-right: 18px !important;
}

.profilecontainer table[dir="ltr"] {
  direction: ltr !important;
}

.profilecontainer table[dir="ltr"] td {
  text-align: left !important;
  direction: ltr !important;
}

.profilecontainer table[dir="ltr"] td:first-child {
  text-align: left !important;
  padding-left: 24px !important;
  padding-right: 18px !important;
}

.profilecontainer table[dir="ltr"] td:last-child {
  text-align: left !important;
  padding-right: 24px !important;
  padding-left: 18px !important;
}

/* Table row styling - support both with and without tbody */
.profilecontainer table tbody tr,
.profilecontainer table tr {
  background: transparent !important;
  background-color: #ffffff !important;
  border: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  position: relative !important;
}

/* Enhanced hover effects - support both with and without tbody */
.profilecontainer table tbody tr:hover,
.profilecontainer table tr:not(:first-child):hover {
  background-color: var(--zara-hover, #fafafa) !important;
  transform: none !important;
  box-shadow: none !important;
}

.profilecontainer table tbody tr:hover td,
.profilecontainer table tr:not(:first-child):hover td {
  color: var(--zara-text, #1a1a1a) !important;
  background-color: var(--zara-hover, #fafafa) !important;
  border-bottom-color: var(--zara-border, #e5e5e5) !important;
}

/* Style header row (first tr) when no thead exists - ensure header row has gradient */
.profilecontainer table>tr:first-child th,
.profilecontainer table tr:first-child th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* Remove bottom border from last row - support both structures */
.profilecontainer table tbody tr:last-child td,
.profilecontainer table tr:last-child td {
  border-bottom: none !important;
}

/* Styling for empty tables or no data rows */
.profilecontainer table tbody tr.empty-row {
  background-color: #f8f9fa !important;
}

.profilecontainer table tbody tr.empty-row td {
  text-align: center !important;
  color: #6c757d !important;
  font-style: italic !important;
  padding: 40px 20px !important;
}

/* Link styling within tables */
.profilecontainer table a {
  color: #c3b78f !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  display: inline-block !important;
}

.profilecontainer table a:hover {
  color: #9d916a !important;
  text-decoration: none !important;
  background-color: rgba(195, 183, 143, 0.1) !important;
  transform: translateY(-1px) !important;
}

.profilecontainer table a:active {
  transform: translateY(0) !important;
}

/* Button styling within tables */
.profilecontainer table button {
  transition: all 0.3s ease !important;
  border-radius: 4px !important;
}

.profilecontainer table button:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Remove Bootstrap table borders and override styles */
.profilecontainer table.table,
.profilecontainer table.table-bordered,
.profilecontainer table.table-striped {
  border: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.profilecontainer table.table th,
.profilecontainer table.table td,
.profilecontainer table.table-bordered th,
.profilecontainer table.table-bordered td {
  border: none !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

.profilecontainer table.table-bordered th {
  border-bottom: 2px solid #dee2e6 !important;
}

/* Remove alternating row colors for cleaner look */
.profilecontainer table.table-striped tbody tr:nth-of-type(odd) {
  background-color: #ffffff !important;
}

.profilecontainer table.table-striped tbody tr:nth-of-type(even) {
  background-color: #fafafa !important;
}

.profilecontainer table.table-striped tbody tr:nth-of-type(even):hover {
  background-color: #f8f9fa !important;
}

/* Table caption styling */
.profilecontainer table caption {
  caption-side: top !important;
  padding: 12px 0 !important;
  font-weight: 600 !important;
  color: #2c3e50 !important;
  text-align: left !important;
  font-size: 16px !important;
}

/* Status badges or labels in tables */
.profilecontainer table .badge,
.profilecontainer table .label {
  display: inline-block !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* Responsive design enhancements */
@media (max-width: 768px) {
  .profilecontainer {
    padding: 20px 16px !important;
    margin-top: 70px !important;
    margin-bottom: 40px !important;
    max-width: 100% !important;
  }

  .profilecontainer h1 {
    font-size: 16px !important;
    letter-spacing: 1.5px !important;
    padding-bottom: 12px !important;
    margin-bottom: 24px !important;
  }

  .profilecontainer hr {
    margin: 24px 0 !important;
  }

  .profilecontainer table {
    font-size: 14px !important;
    margin: 0 !important;
    box-shadow: none !important;
    display: block !important;
    width: 100% !important;
    border: none !important;
  }

  .profilecontainer table tbody {
    display: block !important;
    width: 100% !important;
  }

  .profilecontainer table tr {
    display: block !important;
    width: 100% !important;
    margin-bottom: 16px !important;
    border: 1px solid var(--zara-border, #e5e5e5) !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background-color: var(--zara-white, #ffffff) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  }

  .profilecontainer table td {
    display: block !important;
    width: 100% !important;
    padding: 16px !important;
    text-align: left !important;
    border: none !important;
    border-bottom: 1px solid var(--zara-border, #e5e5e5) !important;
  }

  .profilecontainer table td:first-child {
    padding-bottom: 12px !important;
    border-bottom: 1px solid var(--zara-border, #e5e5e5) !important;
    background-color: var(--zara-gray, #f5f5f5) !important;
  }

  .profilecontainer table td:last-child {
    border-bottom: none !important;
    padding-top: 12px !important;
  }

  .profilecontainer table td:nth-child(2) {
    padding-top: 12px !important;
  }

  .profilecontainer table td strong {
    display: block !important;
    margin-bottom: 0 !important;
    font-size: 13px !important;
    /* Increased from 11px */
    letter-spacing: 1px !important;
    color: var(--zara-text, #1a1a1a) !important;
    font-weight: 500 !important;
  }

  .profilecontainer table td span {
    display: block !important;
    margin-top: 8px !important;
    margin-bottom: 0 !important;
    word-break: break-word !important;
    font-size: 14px !important;
    color: var(--zara-text, #1a1a1a) !important;
  }

  .profilecontainer table .btn-change,
  .profilecontainer table .save {
    width: 100% !important;
    margin: 0 !important;
    padding: 14px 20px !important;
    font-size: 13px !important;
    /* Increased from 11px */
    min-height: 44px !important;
    box-sizing: border-box !important;
  }

  .profilecontainer table input[type="text"],
  .profilecontainer table input[type="password"] {
    width: 100% !important;
    margin: 8px 0 0 0 !important;
    padding: 14px 16px !important;
    box-sizing: border-box !important;
    font-size: 16px !important;
    min-height: 44px !important;
    -webkit-appearance: none !important;
    border-radius: 0 !important;
  }

  .profilecontainer table form {
    display: block !important;
    width: 100% !important;
    margin-top: 8px !important;
  }

  .profilecontainer table #password-inputs {
    display: block !important;
    width: 100% !important;
    margin-top: 8px !important;
  }

  .profilecontainer table #password-inputs label {
    display: block !important;
    margin-top: 12px !important;
    margin-bottom: 8px !important;
    font-size: 13px !important;
    /* Increased from 11px */
    font-weight: 500 !important;
  }

  .profilecontainer table #password-inputs input {
    width: 100% !important;
    margin-bottom: 16px !important;
    padding: 14px 16px !important;
    font-size: 16px !important;
    min-height: 44px !important;
    -webkit-appearance: none !important;
  }

  /* RTL support for mobile cards */
  .profilecontainer table[dir="rtl"] tr {
    direction: rtl !important;
  }

  .profilecontainer table[dir="rtl"] td {
    text-align: right !important;
  }

  .profilecontainer table[dir="ltr"] tr {
    direction: ltr !important;
  }

  .profilecontainer table[dir="ltr"] td {
    text-align: left !important;
  }
}

@media (max-width: 609px) {
  .profilecontainer {
    padding: 16px 12px !important;
    margin-top: 60px !important;
    margin-bottom: 30px !important;
    max-width: 100% !important;
  }

  .profilecontainer h1 {
    font-size: 14px !important;
    letter-spacing: 1px !important;
    padding-bottom: 10px !important;
    margin-bottom: 20px !important;
  }

  .profilecontainer hr {
    margin: 20px 0 !important;
  }

  .profilecontainer table {
    font-size: 13px !important;
    border-radius: 0 !important;
    display: block !important;
    overflow-x: visible !important;
    -webkit-overflow-scrolling: auto !important;
  }

  .profilecontainer table tr {
    margin-bottom: 12px !important;
  }

  .profilecontainer table td {
    padding: 14px 12px !important;
    font-size: 13px !important;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .profilecontainer table td:first-child {
    padding: 12px !important;
  }

  .profilecontainer table td strong {
    font-size: 12px !important;
    /* Increased from 10px */
    margin-bottom: 0 !important;
  }

  .profilecontainer table td span {
    font-size: 13px !important;
    margin-top: 6px !important;
  }

  .profilecontainer table .btn-change,
  .profilecontainer table .save {
    padding: 12px 16px !important;
    font-size: 12px !important;
    /* Increased from 10px */
    letter-spacing: 1px !important;
    min-height: 44px !important;
  }

  .profilecontainer table input[type="text"],
  .profilecontainer table input[type="password"] {
    font-size: 16px !important;
    padding: 12px 14px !important;
    min-height: 44px !important;
    -webkit-appearance: none !important;
  }

  .profilecontainer table #password-inputs label {
    font-size: 10px !important;
    margin-top: 10px !important;
    margin-bottom: 6px !important;
  }

  .profilecontainer table #password-inputs input {
    padding: 12px 14px !important;
    font-size: 16px !important;
    min-height: 44px !important;
    margin-bottom: 12px !important;
  }

  .profilecontainer table tbody tr:hover,
  .profilecontainer table tr:not(:first-child):hover {
    transform: none !important;
  }

  /* RTL support for small mobile */
  .profilecontainer table[dir="rtl"] td {
    text-align: right !important;
  }

  .profilecontainer table[dir="ltr"] td {
    text-align: left !important;
  }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE EXTRA SMALL (< 320px)
   ============================================ */
@media (max-width: 319px) {
  #profilepageimg {
    width: 150px;
    height: 150px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
  }

  .profilecontainer {
    max-width: 100%;
    padding: 12px 10px !important;
    margin-top: 50px !important;
    margin-bottom: 20px !important;
  }

  .profilecontainer h1 {
    font-size: 13px !important;
    padding-bottom: 8px !important;
    margin-bottom: 16px !important;
  }

  .profilecontainer hr {
    margin: 16px 0 !important;
  }

  .profilecontainer table td {
    padding: 12px 10px !important;
    font-size: 12px !important;
  }

  .profilecontainer table td strong {
    font-size: 9px !important;
  }

  .profilecontainer table td span {
    font-size: 12px !important;
  }

  .profilecontainer table .btn-change,
  .profilecontainer table .save {
    padding: 12px 14px !important;
    font-size: 9px !important;
    min-height: 40px !important;
  }

  .profilecontainer table input[type="text"],
  .profilecontainer table input[type="password"] {
    font-size: 16px !important;
    padding: 12px !important;
    min-height: 44px !important;
  }

  h1 {
    font-size: 18px;
  }

  input[type=text],
  input[type=email],
  input[type=password],
  input[type=file] {
    width: 95%;
    padding: 8px;
    margin-left: 2.5%;
    margin-right: 2.5%;
    font-size: 12px;
  }

  input[type=submit] {
    padding: 8px 16px;
    font-size: 12px;
  }

  button {
    font-size: 12px;
    padding: 8px 16px;
  }

  #change-pic-btn,
  #change-name-btn,
  #change-email-btn,
  #change-address-btn,
  #change-pass-btn {
    font-size: 11px;
  }

  #saveaddress,
  .save {
    margin-left: 30%;
    font-size: 11px;
  }

  #change-location-btn {
    margin-left: 25%;
    margin-right: 25%;
    font-size: 11px;
  }

  #city {
    margin-left: 25%;
    font-size: 11px;
  }

  .file-input-label {
    font-size: 11px;
    padding: 8px 16px;
  }

  .user-img {
    width: 80px;
    height: 80px;
  }

  hr {
    width: 80%;
    margin-left: 10%;
  }

  /* Table adjustments for ultra small screens */
  .profilecontainer table {
    font-size: 11px !important;
    border-radius: 4px !important;
    margin: 15px 0 !important;
  }

  .profilecontainer table th,
  .profilecontainer table td {
    padding: 8px 6px !important;
    font-size: 10px !important;
  }

  .profilecontainer table th {
    font-size: 9px !important;
    padding: 8px 6px !important;
  }

  .profilecontainer table th:first-child,
  .profilecontainer table td:first-child {
    padding-left: 10px !important;
  }

  .profilecontainer table th:last-child,
  .profilecontainer table td:last-child {
    padding-right: 10px !important;
  }
}

/* Print styles */
@media print {
  .profilecontainer table {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }

  .profilecontainer table th,
  .profilecontainer table td {
    border: 1px solid #ddd !important;
    padding: 8px !important;
  }

  .profilecontainer table tbody tr:hover {
    background-color: transparent !important;
  }
}

/* Accessibility improvements */
.profilecontainer table th[scope="col"],
.profilecontainer table th[scope="row"] {
  font-weight: 700 !important;
}

.profilecontainer table:focus-within {
  outline: 2px solid #c3b78f !important;
  outline-offset: 2px !important;
}

/* Loading state for tables with async data */
.profilecontainer table.loading tbody tr {
  opacity: 0.6 !important;
  pointer-events: none !important;
}

/* Enhanced selection styling */
.profilecontainer table tbody tr.selected {
  background-color: #e7f3ff !important;
}

.profilecontainer table tbody tr.selected td {
  background-color: #e7f3ff !important;
  border-bottom-color: #b3d9ff !important;
}