/* Button styles for DIEMTDC3 */

/* Nút Submit chính - "Xem" */
button[type='submit'] {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
  margin-left: 10px;
  min-width: 80px;
  position: relative;
  overflow: hidden;
}

button[type='submit']::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
  transition: all 0.6s ease;
}

button[type='submit']:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 6px 10px -1px rgba(37, 99, 235, 0.3);
}

button[type='submit']:hover::before {
  left: 100%;
}

button[type='submit']:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px -1px rgba(37, 99, 235, 0.3);
}

/* Nút Chi tiết */
.detail-btn {
  background: rgba(20, 184, 166, 0.8);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  height: 22px;
  position: relative;
  overflow: hidden;
}

/* Hiệu ứng khi hover nút chi tiết */
.detail-btn:hover {
  background: rgb(20, 184, 166);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.detail-btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Nút đóng modal */
.close-btn,
#closeModal {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 28px;
  height: 28px;
  background: #f3f4f6;
  border-radius: 50%;
  border: none;
  color: #6b7280;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.close-btn:hover,
#closeModal:hover {
  background: #e5e7eb;
  color: #374151;
  transform: rotate(90deg);
}

/* Màu khác nhau cho các nút chi tiết theo môn */
.detail-btn[data-mon='excel'] {
  background-color: rgba(33, 115, 70, 0.8);
}
.detail-btn[data-mon='excel']:hover {
  background-color: rgb(33, 115, 70);
}

.detail-btn[data-mon='word'] {
  background-color: rgba(43, 87, 154, 0.8);
}
.detail-btn[data-mon='word']:hover {
  background-color: rgb(43, 87, 154);
}

.detail-btn[data-mon='powerpoint'] {
  background-color: rgba(210, 71, 38, 0.8);
}
.detail-btn[data-mon='powerpoint']:hover {
  background-color: rgb(210, 71, 38);
}

/* Thêm hiệu ứng ripple */
.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  background-color: rgba(255, 255, 255, 0.4);
}

@keyframes ripple {
  to {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Responsive adjustments */
@media (max-width: 600px) {
  button[type='submit'] {
    padding: 8px 16px;
    font-size: 0.85rem;
    min-width: 60px;
  }

  .detail-btn {
    padding: 1px 5px;
    font-size: 0.7rem;
    height: 18px;
  }

  /* Display icon only on small screens */
  .detail-btn::before {
    content: '👁️';
    font-size: 0.7rem;
    margin-right: 2px;
  }

  .detail-btn {
    max-width: 26px;
    overflow: hidden;
    white-space: nowrap;
  }
}
