/**
 * Legacy w3.css class compatibility — styled with Bootstrap 5 design tokens.
 * Load AFTER bootstrap.rtl.min.css. Do NOT load w3.css when this file is present.
 */
:root {
  --fashir-bs-primary: #5d9693;
  --fashir-bs-primary-dark: #4a7a77;
  --fashir-bs-accent: #e5b82a;
}

/* ── Grid (w3 float columns) ── */
.w3-row::before,
.w3-row::after,
.w3-cell-row::before,
.w3-cell-row::after,
.w3-bar::before,
.w3-bar::after,
.w3-clear::before,
.w3-clear::after {
  content: "";
  display: table;
  clear: both;
}

.w3-row,
.w3-cell-row {
  width: 100%;
}

[class*="w3-col"],
.w3-half,
.w3-third,
.w3-twothird,
.w3-quarter,
.w3-threequarter {
  float: right;
  box-sizing: border-box;
}

.w3-col.s1 { width: 8.33333%; }
.w3-col.s2 { width: 16.66666%; }
.w3-col.s3 { width: 25%; }
.w3-col.s4 { width: 33.33333%; }
.w3-col.s5 { width: 41.66666%; }
.w3-col.s6 { width: 50%; }
.w3-col.s7 { width: 58.33333%; }
.w3-col.s8 { width: 66.66666%; }
.w3-col.s9 { width: 75%; }
.w3-col.s10 { width: 83.33333%; }
.w3-col.s11 { width: 91.66666%; }
.w3-col.s12 { width: 100%; }

.w3-half { width: 50%; }
.w3-third { width: 33.33333%; }
.w3-twothird { width: 66.66666%; }
.w3-quarter { width: 25%; }
.w3-threequarter { width: 75%; }

.w3-col.m1, .w3-col.m2, .w3-col.m3, .w3-col.m4, .w3-col.m5, .w3-col.m6,
.w3-col.m7, .w3-col.m8, .w3-col.m9, .w3-col.m10, .w3-col.m11, .w3-col.m12 {
  width: 100%;
}

@media (min-width: 601px) {
  .w3-col.m1 { width: 8.33333%; }
  .w3-col.m2 { width: 16.66666%; }
  .w3-col.m3 { width: 25%; }
  .w3-col.m4 { width: 33.33333%; }
  .w3-col.m5 { width: 41.66666%; }
  .w3-col.m6 { width: 50%; }
  .w3-col.m7 { width: 58.33333%; }
  .w3-col.m8 { width: 66.66666%; }
  .w3-col.m9 { width: 75%; }
  .w3-col.m10 { width: 83.33333%; }
  .w3-col.m11 { width: 91.66666%; }
  .w3-col.m12 { width: 100%; }
}

.w3-cell-row { display: table; width: 100%; }
.w3-cell { display: table-cell; vertical-align: top; }

/* ── Containers ── */
.w3-container,
.w3-panel {
  padding: 0.01em 16px;
}

.w3-container::after,
.w3-container::before,
.w3-panel::after,
.w3-panel::before {
  content: "";
  display: table;
  clear: both;
}

/* ── Forms (Bootstrap-aligned) ── */
.w3-input,
.w3-select,
select.w3-select {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  background-clip: padding-box;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.w3-input:focus,
.w3-select:focus {
  color: var(--bs-body-color);
  background-color: var(--bs-body-bg);
  border-color: #9ec5c3;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(93, 150, 147, 0.25);
}

.w3-check,
.w3-radio {
  width: 24px;
  height: 24px;
  position: relative;
  top: 6px;
}

/* ── Buttons ── */
.w3-btn,
.w3-button {
  display: inline-block;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: var(--bs-border-width) solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  border-radius: var(--bs-border-radius);
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
    border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  background-color: var(--fashir-bs-primary);
  color: #fff;
}

.w3-btn:hover,
.w3-button:hover {
  background-color: var(--fashir-bs-primary-dark);
  color: #fff;
}

.w3-btn:disabled,
.w3-button:disabled,
.w3-disabled {
  opacity: 0.65;
  pointer-events: none;
}

.w3-block {
  display: block;
  width: 100%;
}

.w3-tiny { font-size: 10px !important; }
.w3-small { font-size: 12px !important; }
.w3-medium { font-size: 15px !important; }
.w3-large { font-size: 18px !important; }

/* ── Theme colors ── */
.w3-theme,
.w3-teal {
  color: #fff !important;
  background-color: var(--fashir-bs-primary) !important;
}

.w3-theme-d1 { color: #fff !important; background-color: #4d7d7a !important; }
.w3-theme-d2 { color: #fff !important; background-color: #3d6462 !important; }
.w3-theme-d3 { color: #fff !important; background-color: #2d4b49 !important; }
.w3-theme-d5 { color: #fff !important; background-color: #1a2e2d !important; }

.w3-theme-l1 { color: #000 !important; background-color: #d4e8e7 !important; }
.w3-theme-l2 { color: #000 !important; background-color: #c0dedc !important; }
.w3-theme-l3 { color: #000 !important; background-color: #ecf5f4 !important; }
.w3-theme-l4 { color: #000 !important; background-color: #f4faf9 !important; }
.w3-theme-l5 { color: #000 !important; background-color: #f8fcfb !important; }

.w3-text-theme { color: var(--fashir-bs-primary) !important; }
.w3-border-theme { border-color: var(--fashir-bs-primary) !important; }
.w3-hover-theme:hover { color: #fff !important; background-color: var(--fashir-bs-primary) !important; }

.w3-pale-red { background-color: #ffdddd !important; }
.w3-pale-green { background-color: #ddffdd !important; }
.w3-pale-yellow { background-color: #ffffcc !important; }
.w3-pale-blue { background-color: #e8f4f3 !important; }

.w3-red { color: #fff !important; background-color: var(--bs-danger) !important; }
.w3-green { color: #fff !important; background-color: var(--bs-success) !important; }
.w3-yellow { color: #000 !important; background-color: var(--bs-warning) !important; }
.w3-blue { color: #fff !important; background-color: var(--bs-primary) !important; }
.w3-white { color: #000 !important; background-color: #fff !important; }
.w3-black { color: #fff !important; background-color: #000 !important; }

.w3-text-red { color: var(--bs-danger) !important; }
.w3-text-green { color: var(--bs-success) !important; }
.w3-text-black { color: #000 !important; }

.w3-border-red { border-color: var(--bs-danger) !important; }
.w3-border-green { border-color: var(--bs-success) !important; }
.w3-border-yellow { border-color: var(--bs-warning) !important; }

.w3-hover-red:hover { color: #fff !important; background-color: var(--bs-danger) !important; }
.w3-hover-green:hover { color: #fff !important; background-color: var(--bs-success) !important; }
.w3-hover-pale-red:hover { background-color: #ffc7c7 !important; }

/* ── Utilities ── */
.w3-center { text-align: center !important; }
.w3-left { text-align: left !important; }
.w3-right { text-align: right !important; }
.w3-left-align { text-align: left !important; }
.w3-right-align { text-align: right !important; }

.w3-padding { padding: 8px 16px !important; }
.w3-padding-small { padding: 4px 8px !important; }
.w3-padding-large { padding: 12px 24px !important; }
.w3-padding-16 { padding-top: 16px !important; padding-bottom: 16px !important; }
.w3-padding-tiny { padding: 2px 4px !important; }

.w3-margin { margin: 16px !important; }
.w3-margin-top { margin-top: 16px !important; }
.w3-margin-bottom { margin-bottom: 16px !important; }

.w3-border { border: 1px solid var(--bs-border-color) !important; }
.w3-round { border-radius: var(--bs-border-radius) !important; }
.w3-round-large { border-radius: var(--bs-border-radius-lg) !important; }
.w3-round-xlarge { border-radius: var(--bs-border-radius-xl) !important; }

.w3-card,
.w3-card-2,
.w3-card-4 {
  box-shadow: var(--bs-box-shadow);
}

.w3-card-4 {
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2), 0 4px 20px 0 rgba(0, 0, 0, 0.19);
}

.w3-animate-opacity { animation: fashir-w3-opacity 0.8s; }
.w3-animate-top { position: relative; animation: fashir-w3-top 0.4s; }
.w3-animate-zoom { animation: fashir-w3-zoom 0.6s; }
.w3-animate-input { transition: width 0.4s ease-in-out; }

@keyframes fashir-w3-opacity {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fashir-w3-top {
  from { top: -300px; opacity: 0; }
  to { top: 0; opacity: 1; }
}

@keyframes fashir-w3-zoom {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

/* ── Modal (w3 structure, bootstrap-like overlay) ── */
.w3-modal {
  z-index: 1055;
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.w3-modal.is-open,
.w3-modal[style*="display: block"] {
  display: block;
}

.w3-modal-content {
  position: relative;
  background-color: var(--bs-body-bg);
  margin: auto;
  padding: 0;
  outline: 0;
  width: 80%;
  max-width: 100%;
  border-radius: var(--bs-border-radius-lg);
  box-shadow: var(--bs-box-shadow-lg);
}

.w3-display-topright {
  position: absolute;
  right: 0;
  top: 0;
}

/* ── Bar / dropdown ── */
.w3-bar {
  width: 100%;
  overflow: hidden;
}

.w3-bar .w3-bar-item,
.w3-bar .w3-button,
.w3-bar .w3-btn,
.w3-navbar .w3-bar-item,
.w3-navbar .w3-button,
.w3-navbar li {
  float: right;
  width: auto;
  border: none;
  display: block;
  outline: 0;
  list-style: none;
}

.w3-navbar {
  width: 100%;
  overflow: hidden;
  padding: 0;
  margin: 0;
  list-style: none;
}

.w3-bottombar {
  border-bottom: 3px solid var(--fashir-bs-primary) !important;
}

.w3-dropdown-hover,
.w3-dropdown-click {
  position: relative;
  display: inline-block;
}

.w3-dropdown-content {
  cursor: auto;
  color: #000;
  background-color: #fff;
  display: none;
  position: absolute;
  min-width: 160px;
  margin: 0;
  padding: 0;
  z-index: 1040;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow);
}

.w3-dropdown-hover:hover .w3-dropdown-content,
.w3-dropdown-click:hover .w3-dropdown-content,
.w3-dropdown-click.w3-show .w3-dropdown-content,
.w3-show .w3-dropdown-content {
  display: block;
}

.w3-dropdown-content.w3-show {
  display: block;
}

.w3-bar-item.w3-button,
.w3-dropdown-hover:first-child,
.w3-dropdown-click:hover {
  background-color: #fff;
  color: #000;
}

@media (max-width: 600px) {
  .w3-dropdown-hover.w3-mobile .w3-dropdown-content,
  .w3-dropdown-click.w3-mobile .w3-dropdown-content {
    position: relative;
  }

  .w3-hide-small {
    display: none !important;
  }

  .w3-mobile {
    display: block;
    width: 100% !important;
  }

  .w3-bar-item.w3-mobile,
  .w3-dropdown-hover.w3-mobile,
  .w3-dropdown-click.w3-mobile {
    text-align: center;
  }

  .w3-dropdown-hover.w3-mobile,
  .w3-dropdown-hover.w3-mobile .w3-btn,
  .w3-dropdown-hover.w3-mobile .w3-button,
  .w3-dropdown-click.w3-mobile,
  .w3-dropdown-click.w3-mobile .w3-btn,
  .w3-dropdown-click.w3-mobile .w3-button {
    width: 100%;
  }
}

.w3-hide { display: none !important; }
.w3-show-block { display: block !important; }

.w3-responsive {
  display: block;
  overflow-x: auto;
}

.w3-table,
.w3-table-all {
  border-collapse: collapse;
  width: 100%;
}

.w3-table-all tr:nth-child(even) {
  background-color: rgba(0, 0, 0, 0.04);
}

.w3-striped tbody tr:nth-child(even) {
  background-color: #f1f1f1;
}

.w3-ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.w3-ul li {
  padding: 8px 16px;
  border-bottom: 1px solid var(--bs-border-color);
}

.w3-hoverable tbody tr:hover,
.w3-ul li:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.w3-validate:invalid {
  border-color: var(--bs-danger) !important;
}

.w3-badge {
  background-color: #000;
  color: #fff;
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--bs-border-radius-pill);
}

.w3-tag {
  background-color: #000;
  color: #fff;
  display: inline-block;
  padding: 0.25em 0.6em;
  border-radius: var(--bs-border-radius);
}

.w3-spin {
  animation: fashir-w3-spin 2s infinite linear;
}

@keyframes fashir-w3-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(359deg); }
}

.w3-circle {
  border-radius: 50%;
}

.w3-opacity,
.w3-hover-opacity:hover {
  opacity: 0.6;
}

.w3-grayscale-max,
.w3-greyscale-max {
  filter: grayscale(100%);
}

.w3-tooltip {
  position: relative;
  display: inline-block;
}

.w3-tooltip .w3-text {
  display: none;
}

.w3-tooltip:hover .w3-text {
  display: inline-block;
}
