@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

body {
    font-family: Vazirmatn, sans-serif;

}
.wp-block-group.alignfull.has-global-padding.is-layout-constrained.wp-block-group-is-layout-constrained{
  padding-top: 0 !important;
}
button,
input[type="button"],
input[type="submit"] {
    font-family: Vazirmatn, sans-serif;

}
a,span{
    font-family: vazirmatn, sans-serif;
    font-weight: bold;
}
.shift-user-flex {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  flex-direction: row;
  margin: 0 !important;
  direction: rtl;
  justify-content: flex-start;
  max-width: 100%;
  padding: 0 1rem;
  align-items: flex-start;
}

.shift-user-box1 {
  background: #00525c;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1.5rem;
  width: 33.33%;
  flex: 0 0 33.33%;
  height: fit-content;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: sticky;
  top: 5%;
  z-index: 10;
  color: white;
  font-weight: bold;
  margin-right: 0;
}

.shift-user-box2 {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  width: 66.67%;
  flex: 0 0 66.67%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}
.shift-user-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.shift-user-info-list {
  padding: 0;
}

.shift-user-info-list li {
  margin-bottom: 0.5em;
  font-size: 0.9em;
  padding: 0.5em 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shift-user-info-list li:last-child {
  border-bottom: none;
}

.shift-user-info-list li.text-center {
  text-align: center;
}

.shift-user-info-list li .hours-display {
  margin-top: 0.5em;
  background: linear-gradient(45deg, rgba(51, 255, 0, 0.1), rgba(0, 74, 20, 0.2));
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid rgba(255,255,255,0.2);
}

.hours-display {
  background: rgba(255, 255, 255, 0.15);
  padding: 0.5em 1em;
  border-radius: 8px;
  text-align: center;
  margin: 0.5em 0;
  font-size: 1.4em;
  direction: ltr;
  display: inline-block;
}

#total-hours, #max-hours {
  font-weight: bold;
  color: #fff;
  font-size: 1.1em;
  font-family: 'Vazirmatn', monospace;
}

.shift-user-box1 h3 {
  font-size: 1.4em;
  margin-bottom: 1.5em;
  text-align: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 0.5em;
  font-weight: bold;
}
.shift-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(37,56,165,0.08);
  font-size: 0.95em;
}

.shift-table th {
  background: #00525c;
  color: white;
  padding: 1em 0.8em;
  font-weight: bold;
  text-align: center;
  border: none;
  font-size: 1em;
}

.shift-table td {
  padding: 0.8em;
  text-align: center;
  border-bottom: 1px solid rgba(9,154,169,0.1);
  transition: background-color 0.2s ease;
  vertical-align: middle;
}

.shift-table tr:last-child td {
  border-bottom: none;
}

.shift-table tr:hover td {
  background-color: rgba(9,154,169,0.03);
}

.shift-table th:first-child,
.shift-table td:first-child {
  padding-right: 1.2em;
}

.shift-table th:last-child,
.shift-table td:last-child {
  padding-left: 1.2em;
}

.shift-select-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.shift-select {
  padding: 0.6em 1.6em;
  border-radius: 6px;
  border: 1px solid rgba(9,154,169,0.2);
  background-color: white;
  color: #333;
  font-family: Vazirmatn, sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2300525c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.8em center;
  padding-left: 2.5em;
  width: 100px;
  text-align: center;
  width: auto;
  min-width: 100px;
}

.shift-select:hover {
  border-color: #00525c;
  background-color: rgba(9,154,169,0.02);
}

.shift-select:focus {
  outline: none;
  border-color: #00525c;
  box-shadow: 0 0 0 2px rgba(9,154,169,0.1);
}

.shift-select option {
  padding: 0.4em;
}

.shift-table tr:nth-child(even) {
  background-color: rgba(9,154,169,0.02);
}

/* Locked days and shifts */
.shift-table tr.locked-day {
  background-color: rgba(200, 200, 200, 0.2);
}

.shift-table tr.locked-day td {
  color: #666;
}

.shift-select-container.locked-shift select {
  background-color: #f0f0f0;
  border-color: #ddd;
  color: #666;
  cursor: not-allowed;
}

.shift-select:disabled {
  background-color: #f0f0f0;
  border-color: #ddd;
  color: #666;
  cursor: not-allowed;
}

/* Light red background when value is absent */
.shift-select[value="absent"],
.shift-select:has(option[value="absent"]:checked) {
  background-color: #ffe0e0;
  border-color: #ffcccc;
}

.shift-select[value="absent"]:hover,
.shift-select:has(option[value="absent"]:checked):hover {
  background-color: #ffd9d9;
}

.save-button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  border-color: #bbb;
}

.shift-radio-group {
  display: flex;
  gap: 0.5em;
  justify-content: center;
}
.button-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: center;
  width: 100%;
  margin: 1rem 0;
}

.exit-button {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    margin: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #fff;
}

a.shift-panel-link2.exit-button {
    background-color: #00525c;
}

a.shift-panel-link2.exit-button:hover {
    background-color: #096b76;
    transform: translateY(-2px);
}

a#logout-button.exit-button {
    background-color: #f44336;
}

a#logout-button.exit-button:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
}

/* Summary row styles */
.shift-summary-row {
    background-color: #f8f9fa !important;
    font-weight: bold;
}

.shift-summary-row td {
    border-top: 2px solid #00525c !important;
    padding: 1em 0.8em !important;
}

.shift-type-count {
    display: block;
    text-align: center;
    color: #00525c;
}

/* Loading state */
.shift-select-container.loading {
  opacity: 0.7;
  pointer-events: none;
}

.shift-select-container.loading:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(9,154,169,0.3);
  border-top-color: #00525c;
  border-radius: 50%;
  animation: shift-loading 0.6s linear infinite;
}
nav.nav-tab-wrapper2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
nav.nav-tab-wrapper2 {
    border-bottom: none;
    margin-bottom: 30px;
    display: flex;
    gap: 10px;
    background: rgba(9,154,169,0.05);
    padding: 10px;
    border-radius: 12px;
    flex-wrap: wrap;
}
a.shift-panel-link2 {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    background-color: #00525c;
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    margin: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}
a.shift-panel-link2:hover {
    background-color: #096b76ff;
    transform: translateY(-2px);
}
a#logout-button {
    display: inline-block;
    text-align: center;
    text-decoration: none;
    background-color: #f44336;
    color: #fff;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 16px;
    transition: background-color 0.3s, transform 0.2s;
    margin: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}
a#logout-button:hover {
    background-color: #d32f2f;
    transform: translateY(-2px);
}
.shift-toast {
    min-width: 250px;
    padding: 12px 20px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
}
.shift-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.shift-toast.success { background-color: #28a745; }
.shift-toast.error   { background-color: #dc3545; }
.shift-toast.warning { background-color: #ffc107; color: #000; }

@keyframes shift-loading {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .shift-user-flex {
    padding: 0 0.5rem;
    gap: 0.5rem;
  }
  
  .shift-user-box1 {
    width: 33.33%;
    flex: 0 0 33.33%;
    min-width: auto;
    padding: 1.2rem;
  }
  
  .shift-user-box2 {
    width: 66.67%;
    flex: 0 0 66.67%;
    min-width: auto;
  }
  
  .shift-select {
    width: 90px;
  }
}

@media (max-width: 1024px) {
  .shift-user-box1 {
    width: 33.33%;
    flex: 0 0 33.33%;
    min-width: auto;
    padding: 1rem;
  }
  
  .shift-user-box2 {
    width: 66.67%;
    flex: 0 0 66.67%;
    min-width: auto;
  }
}

.shift-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
}

@media (max-width: 900px) {
  .shift-user-flex {
    flex-direction: column;
    padding: 0 1rem;
  }
  
  .shift-user-box1, 
  .shift-user-box2 {
    width: 100%;
    min-width: auto;
  }
  
  .shift-user-box1 {
    position: static;
    margin-bottom: 1rem;
    padding: 1.5rem;
    height: auto;
  }
  
  .shift-table {
    font-size: 0.9em;
  }
  
  .shift-user-box2 {
    padding: 0;
  }
  
  .shift-table-wrapper {
    padding: 0.5rem;
    overflow-x: auto;
  }
}

@media (max-width: 768px) {
  .shift-user-flex {
    flex-direction: column;
    padding: 0 0.5rem;
    gap: 0.5rem;
  }
  
  .shift-user-box1,
  .shift-user-box2 {
    width: 100%;
    min-width: auto;
  }
  
  .shift-user-box1 {
    position: static;
    margin-bottom: 1rem;
    width: 100%;
    min-width: auto;
    padding: 1rem;
    height: auto;
  }
  
  .shift-user-info-list li {
    font-size: 0.85em;
    margin-bottom: 0.3em;
    padding: 0.4em 0;
  }
  
  .shift-table {
    font-size: 0.85em;
    margin: 0;
  }
  
  .shift-table th,
  .shift-table td {
    padding: 0.6em 0.5em;
  }
  
  .shift-select {
    font-size: 0.8rem;
    padding: 0.5em 0.8em;
    min-width: 85px;
    width: auto;
  }
  
  nav.nav-tab-wrapper2 {
    flex-wrap: wrap;
  }
  
  a.shift-panel-link2,
  a#logout-button {
    width: 100%;
    margin: 4px 0;
  }
}

@media (max-width: 480px) {
  .shift-user-flex {
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.5rem;
  }
  
  .shift-user-box1,
  .shift-user-box2 {
    width: 100%;
    min-width: auto;
    border-radius: 8px;
  }
  
  .shift-user-box1 {
    padding: 1rem;
    position: static;
    margin-bottom: 1rem;
    height: auto;
  }
  
  .shift-user-info-list li {
    font-size: 0.8em;
    padding: 0.35em 0;
    margin-bottom: 0.2em;
  }
  
  .shift-user-info-list li strong {
    display: block;
    font-size: 0.85em;
    margin-bottom: 0.2em;
  }
  
  .hours-display {
    font-size: 1.1em;
    padding: 0.4em 0.8em;
  }
  
  .shift-table {
    font-size: 0.75em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .shift-table th,
  .shift-table td {
    padding: 0.5em 0.4em;
  }
  
  .shift-select {
    font-size: 0.75rem;
    padding: 0.4em 0.6em;
    min-width: 75px;
    background-position: left 0.5em center;
    padding-left: 2em;
  }
  
  .shift-table th {
    font-size: 0.85em;
  }
  
  nav.nav-tab-wrapper2 {
    flex-direction: column;
    padding: 8px;
    margin-bottom: 15px;
    gap: 5px;
  }
  
  a.shift-panel-link2,
  a#logout-button {
    width: 100%;
    padding: 8px 15px;
    font-size: 14px;
    margin: 0;
  }
  
  .shift-table-wrapper {
    padding: 0.5rem;
  }
  
  .shift-table tr:hover td {
    background-color: rgba(9,154,169,0.02);
  }
}