/* Reset basic */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: #f5f7fa;
  font-family: 'Poppins', sans-serif !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

/* Tabs */
.tabs {
  display: flex;
  margin-bottom: 20px;
  flex-wrap: nowrap;
}

.tab-btn {
  padding: 10px 20px;
  margin: 5px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.tab-btn.active, .tab-btn:hover {
  background: #0074f1;
}

/* Tab content */
.tab-content {
  display: none;
  width: 100%;
  max-width: 600px;
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tab-content.active {
  display: block;
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

form input, form textarea, form button {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  font-family: sans-serif;
}

label {
  font-weight: bold;
  user-select: none;
}

textarea {
  resize: vertical; /* Hanya boleh resize atas bawah */
  width: 100%; /* Biar full parent */
  max-width: 100%; /* Biar gak bisa lebih besar dari parent */
  height: 100px;
  min-height: 40px;
  box-sizing: border-box; /* Padding + border dihitung dalam width */
}

select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

form button {
  background: #007bff;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

form button:hover {
  background: #0074f1;
}

.alert-warning {
  background-color: #fff3cd;
  color: #856404;
  padding: 12px 20px;
  margin-bottom: 20px;
  border: 1px solid #ffeeba;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
}

/* Signature canvas */
#signature {
  background: white;
  border: 2px dashed #bbb;
  border-radius: 8px;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1; /* 600x300 ratio, responsive */
  touch-action: none; /* Allow touch draw on mobile */
}

/* Clear button */
#clearSig {
  background: #ff4d4d;
  color: white;
  border: none;
  padding: 8px 16px;
  margin-top: 10px;
  border-radius: 6px;
  cursor: pointer;
}

#clearSig:hover {
  background: #e60000;
}

/* Remove Other Artists */
#removeOtherArtists {
  background: #ff4d4d;
  color: white;
  border: none;
  padding: 8px 16px;
  margin-top: 10px;
  border-radius: 6px;
  cursor: pointer;
}

#removeOtherArtists:hover {
  background: #e60000;
}

/* History list */
#historyList {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  list-style: none;
  padding: 0;
  gap: 15px;
}

#historyList li {
  padding: 10px;
  background: #eef1f6;
  border-radius: 8px;
}

#historyList a {
  color: #007bff;
  text-decoration: none;
  user-select: none;
  -webkit-user-drag: none;
}

#historyList strong {
  display: block;
  font-size: 18px;
  margin-bottom: 5px;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .tab-content {
    padding: 15px;
  }

  .tab-btn {
    width: 100%;
    text-align: center;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  background-color: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: #fefefe;
  padding: 20px;
  border-radius: 8px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  transform: translateY(-30px);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-buttons {
  margin-top: 20px;
  display: flex;
  justify-content: space-around;
}

.modal-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#modalCancel {
  background-color: #ccc;
}

#modalOk {
  background-color: #4CAF50;
  color: white;
}
