/* Shared: toast, forms, auth, course listing */

.auth-form-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: .9rem;
  line-height: 1.45;
  text-align: left;
}
.auth-form-alert i { margin-top: 2px; }
.auth-form-alert.is-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}
.auth-form-alert.is-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: #166534;
}

/* Toast */
.pd-toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.pd-toast {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 17px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15), 0 2px 8px rgba(15, 23, 42, 0.08);
  border-left: 4px solid #22c55e;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  color: #1e293b;
  line-height: 1.45;
  pointer-events: auto;
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  transition: transform .35s cubic-bezier(.21, 1, .34, 1), opacity .35s ease;
}

.pd-toast.pd-toast-visible { transform: translateX(0); opacity: 1; }
.pd-toast.pd-toast-hiding { transform: translateX(calc(100% + 24px)); opacity: 0; }
.pd-toast-error { border-left-color: #ef4444; }
.pd-toast-success { border-left-color: #22c55e; }

.pd-toast-icon {
  width: 22px;
  min-width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  margin-top: 1px;
}

.pd-toast-success .pd-toast-icon { background: #dcfce7; color: #16a34a; }
.pd-toast-error .pd-toast-icon { background: #fee2e2; color: #dc2626; }

.pd-toast-body { flex: 1; min-width: 0; padding-right: 4px; }

.pd-toast-title {
  font-weight: 700;
  font-size: .78rem;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.pd-toast-success .pd-toast-title { color: #16a34a; }
.pd-toast-error .pd-toast-title { color: #dc2626; }
.pd-toast-message { font-size: .86rem; color: #334155; }

.pd-toast-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin: -2px 0 0 4px;
}

.pd-toast-close:hover { color: #475569; }

.pd-toast-progress {
  position: absolute;
  bottom: 0;
  left: 4px;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.pd-toast-progress-bar {
  height: 100%;
  width: 100%;
  transform-origin: left;
  animation: pdToastProgress 4s linear forwards;
}

.pd-toast-success .pd-toast-progress-bar { background: #22c55e; }
.pd-toast-error .pd-toast-progress-bar { background: #ef4444; }

@keyframes pdToastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Forms & auth */
.auth-card {
  max-width: 440px;
  margin: 60px auto;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 40px;
  background: #fff;
}

.auth-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 24px;
  text-align: center;
}

.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  display: block;
}

.form-control {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Poppins', sans-serif;
  font-size: .88rem;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: #1a1a1a;
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.btn-pd-primary {
  display: inline-block;
  background: #1a1a1a;
  color: #fff;
  border: 2px solid #1a1a1a;
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 700;
  font-size: .85rem;
  text-align: center;
  cursor: pointer;
}

.btn-pd-primary:hover {
  background: #333;
  border-color: #333;
  color: #fff;
}

/* Course listing */
.page-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a1a1a;
  margin-bottom: 16px;
}

.course-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  height: 100%;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .25s ease, transform .25s ease;
}

.course-card:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.course-card .pd-course-card-thumb {
  margin: -16px -16px 14px;
}

.course-card h5 {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.course-card .rating {
  color: #a67c00;
  font-size: .75rem;
  margin: 6px 0;
}

.btn-view-course {
  border: 1.5px solid #1a1a1a;
  color: #1a1a1a;
  border-radius: 8px;
  padding: 6px 20px;
  font-size: .75rem;
  font-weight: 700;
  display: inline-block;
  margin-top: 10px;
}

.btn-view-course:hover {
  background: #1a1a1a;
  color: #fff;
}

@media (max-width: 575px) {
  .pd-toast-stack {
    top: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}
