:root {
  --vac-main-color: #6b38bd;
  --vac-highlight-color: #4caf50;
}

.nestle-vacations-module .vac-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  padding: 0.5rem;
  margin: 0;
  background: transparent;
}

.nestle-vacations-module .vac-list::-webkit-scrollbar {
  width: 6px;
}
.nestle-vacations-module .vac-list::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 3px;
}

.nestle-vacations-module .vac-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background-color 0.2s ease;
  animation: fadeInUp 0.4s ease forwards;
}
.nestle-vacations-module .vac-item:nth-child(1) { animation-delay: 0.05s; }
.nestle-vacations-module .vac-item:nth-child(2) { animation-delay: 0.10s; }
.nestle-vacations-module .vac-item:nth-child(3) { animation-delay: 0.15s; }
/* и т.д. */

.nestle-vacations-module .vac-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  background-color: #fafafa;
}

.nestle-vacations-module .vac-item.active {
  animation: pulse 1.5s infinite;
}

.nestle-vacations-module .vac-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background-color: var(--vac-main-color);
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}

.nestle-vacations-module .vac-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nestle-vacations-module .photo-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 0.5rem;
  background: #f0f0f0;
  transition: transform 0.3s ease;
}
.nestle-vacations-module .vac-item:hover .photo-wrapper {
  transform: scale(1.1) rotate(-2deg);
}

.nestle-vacations-module .vac-info {
  text-align: center;
}
.nestle-vacations-module .vac-name {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  transition: color 0.2s ease;
}
.nestle-vacations-module .vac-item:hover .vac-name {
  color: var(--vac-highlight-color);
}
.nestle-vacations-module .vac-dates {
  font-size: 0.8rem;
  color: #6c757d;
  background: #e9ecef;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nestle-vacations-module .vac-item:hover .vac-dates {
  background: var(--vac-main-color);
  color: #fff;
}

/* === Анимации карточек === */
@keyframes fadeInUp {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 rgba(76,175,80,0.7); }
  70%  { box-shadow: 0 0 10px rgba(76,175,80,0); }
  100% { box-shadow: 0 0 0 rgba(76,175,80,0); }
}

/* === Модальные окна и оверлей === */
.nestle-vacations-module .vac-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateY(-20px);
  background: white;
  padding: 20px;
  max-width: 400px;
  border: 2px solid var(--vac-main-color);
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 1001;
  display: none;
}

.nestle-vacations-module .modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 1000;
}

.nestle-vacations-module .vac-modal.show {
  transform: translate(-50%, -50%) translateY(0);
  display: block;
  opacity: 1;
}
.nestle-vacations-module .modal-overlay.show {
  /* the backdrop fills the whole viewport — it must NOT be translated */
  display: block;
  opacity: 1;
}

.nestle-vacations-module .vac-modal h4 {
  margin-top: 0;
}

.nestle-vacations-module .modal-close-btn {
  position: absolute;
  right: 10px;
  top: 5px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.nestle-vacations-module .vac-error {
  color: red;
  font-size: 14px;
  margin: 10px 0;
}


/* === Формы в модалках === */
.nestle-vacations-module .vac-modal label {
  display: none;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--vac-main-color);
}



.nestle-vacations-module .vac-modal input[type="date"],
.nestle-vacations-module .vac-modal select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.nestle-vacations-module .vac-modal input[type="date"]:focus,
.nestle-vacations-module .vac-modal select:focus {
  border-color: var(--vac-highlight-color);
  outline: none;
}

.nestle-vacations-module .vac-item.active::before {
  background-color: var(--vac-highlight-color);
}

/* Кнопки модалок */
.nestle-vacations-module .vac-modal .mod-employees-submit-btn,
.nestle-vacations-module .vac-modal button.modal-close-btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.nestle-vacations-module .vac-modal .mod-employees-submit-btn {
  background-color: var(--vac-main-color);
  color: #fff;
  margin-top: 0.5rem;
}

.nestle-vacations-module .vac-modal .mod-employees-submit-btn:hover {
  background-color: var(--vac-highlight-color);
  transform: translateY(-1px);
}

.nestle-vacations-module .vac-modal button.modal-close-btn {
  background: transparent;
  color: #999;
  font-size: 1.2rem;
  line-height: 1;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
}

.nestle-vacations-module .vac-modal button.modal-close-btn:hover {
  color: var(--vac-main-color);
}

/* Заголовок */
.nestle-vacations-module .vac-modal h4 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--vac-main-color);
  text-align: center;
}
