/* Agile Academy Trainer Widget Styles - Vanilla Theme */
:root {
  --saColorInformationDark: #3b82f6;
  --saColorInformationLight: #dbeafe;
}

.aa-widget {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  line-height: 1.5;
  transition: all 0.3s ease;
}

.aa-widget:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.aa-widget * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Widget Header */
.aa-widget-header {
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #374151;
  position: relative;
}

.aa-trainer-info {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.aa-trainer-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.aa-trainer-photo:hover {
  transform: scale(1.05);
}

.aa-trainer-details {
  flex: 1;
  min-width: 0;
}

.aa-trainer-name {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.aa-trainer-title {
  font-size: 15px;
  color: #6b7280;
  margin-bottom: 4px;
  font-weight: 500;
}

.aa-trainer-org {
  font-size: 14px;
  color: #9ca3af;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aa-trainer-org::before {
  content: '🏢';
  font-size: 12px;
}

/* Courses List */
.aa-courses-list {
  padding: 0;
  background: #ffffff;
}

/* Course Item */
.aa-course-item {
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
  transition: all 0.2s ease;
  position: relative;
  background: #ffffff;
}

.aa-course-item:last-child {
  border-bottom: none;
}

.aa-course-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: #d1d5db;
  transition: all 0.2s ease;
}

.aa-course-item:hover {
  background: #f9fafb;
  transform: translateX(2px);
}

.aa-course-item:hover::before {
  background: #6b7280;
}

/* Course Header */
.aa-course-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  gap: 12px;
}

.aa-course-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aa-logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 6px;
}

.aa-course-title-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.aa-course-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}

.aa-course-level {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aa-course-title a {
  color: #374151;
  text-decoration: none;
  transition: color 0.2s ease;
}

.aa-course-title a:hover {
  color: #111827;
  text-decoration: underline;
}

.aa-course-badge {
  background: #e5e7eb;
  color: #374151;
  font-size: 10px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Course Meta */
.aa-course-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.aa-course-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aa-course-detail-row {
  display: flex;
  align-items: center;
  gap: 0px;
  font-size: 14px;
  color: #6b7280;
}

.aa-course-detail-icon {
  font-size: 12px;
  color: var(--saColorInformationDark);
  border-radius: 50%;
  background-color: var(--saColorInformationLight);
  padding: 6px;
  margin-right: 8px;

  display: flex !important;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.aa-course-date {
  font-weight: 500;
}

.aa-course-location {
  font-weight: 500;
}

.aa-course-language {
  font-weight: 500;
}

.aa-course-duration {
  font-weight: 500;
}

/* Course CTA */
.aa-course-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.aa-course-price-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.aa-course-price {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.aa-course-price-currency {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.aa-early-bird {
  background: #fef3c7;
  color: #d97706;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid #fde68a;
  white-space: nowrap;
}

.aa-course-btn {
  background: #374151;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 120px;
  border: none;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  gap: 2px;
}

.aa-course-btn:hover {
  background: #111827;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: white;
}

.aa-btn-main {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.aa-btn-sub {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
  line-height: 1;
}

/* View All Section */
.aa-view-all {
  padding: 20px 24px;
  text-align: center;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.aa-view-all a {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.aa-view-all a:hover {
  color: #111827;
  text-decoration: underline;
}

.aa-view-all a::after {
  content: '→';
  transition: transform 0.2s ease;
}

.aa-view-all a:hover::after {
  transform: translateX(2px);
}

/* No Courses */
.aa-no-courses {
  padding: 40px 24px;
  text-align: center;
  color: #9ca3af;
  font-style: italic;
}

/* Widget Footer */
.aa-widget-footer {
  padding: 12px 24px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  text-align: center;
}

.aa-powered-by {
  font-size: 12px;
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s ease;
}

.aa-powered-by:hover {
  color: #6b7280;
  text-decoration: none;
}

/* Error State */
.aa-error {
  padding: 24px;
  text-align: center;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

/* Dark Theme */
.aa-widget-dark {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}

.aa-widget-dark .aa-widget-header {
  background: #374151;
  border-color: #4b5563;
  color: #f9fafb;
}

.aa-widget-dark .aa-trainer-name {
  color: #f9fafb;
}

.aa-widget-dark .aa-trainer-title,
.aa-widget-dark .aa-trainer-org {
  color: #d1d5db;
}

.aa-widget-dark .aa-trainer-photo {
  border-color: #4b5563;
}

.aa-widget-dark .aa-courses-list {
  background: #1f2937;
}

.aa-widget-dark .aa-course-item {
  background: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}

.aa-widget-dark .aa-course-item::before {
  background: #4b5563;
}

.aa-widget-dark .aa-course-item:hover {
  background: #374151;
}

.aa-widget-dark .aa-course-item:hover::before {
  background: #9ca3af;
}

.aa-widget-dark .aa-course-title a {
  color: #f9fafb;
}

.aa-widget-dark .aa-course-title a:hover {
  color: #e5e7eb;
}

.aa-widget-dark .aa-course-level {
  color: #9ca3af;
}

.aa-widget-dark .aa-course-badge {
  background: #4b5563;
  color: #e5e7eb;
}

.aa-widget-dark .aa-course-detail-row {
  color: #d1d5db;
}

.aa-widget-dark .aa-course-detail-icon {
  color: #60a5fa;
  background-color: #1e3a8a;
}

.aa-widget-dark .aa-course-date {
  color: #34d399;
}

.aa-widget-dark .aa-course-location {
  color: #60a5fa;
}

.aa-widget-dark .aa-course-language {
  color: #34d399;
}

.aa-widget-dark .aa-course-duration {
  color: #9ca3af;
}

.aa-widget-dark .aa-course-price {
  color: #f9fafb;
}

.aa-widget-dark .aa-course-price-currency {
  color: #d1d5db;
}

.aa-widget-dark .aa-early-bird {
  background: #451a03;
  color: #fbbf24;
  border-color: #92400e;
}

.aa-widget-dark .aa-course-btn {
  background: #6b7280;
  color: #f9fafb;
}

.aa-widget-dark .aa-course-btn:hover {
  background: #9ca3af;
  color: #f9fafb;
}

.aa-widget-dark .aa-btn-sub {
  opacity: 0.7;
}

.aa-widget-dark .aa-view-all {
  background: #374151;
  border-color: #4b5563;
}

.aa-widget-dark .aa-view-all a {
  color: #d1d5db;
}

.aa-widget-dark .aa-view-all a:hover {
  color: #f9fafb;
}

.aa-widget-dark .aa-no-courses {
  color: #9ca3af;
}

.aa-widget-dark .aa-widget-footer {
  background: #374151;
  border-color: #4b5563;
}

.aa-widget-dark .aa-powered-by {
  color: #9ca3af;
}

.aa-widget-dark .aa-powered-by:hover {
  color: #d1d5db;
}

/* Responsive Design */
@media (max-width: 480px) {
  .aa-trainer-info {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .aa-trainer-photo {
    width: 60px;
    height: 60px;
  }

  .aa-trainer-name {
    font-size: 18px;
  }

  .aa-course-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .aa-course-meta {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .aa-course-cta {
    align-items: stretch;
  }

  .aa-course-btn {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .aa-widget-header,
  .aa-course-item,
  .aa-view-all,
  .aa-widget-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .aa-trainer-name {
    font-size: 16px;
  }

  .aa-course-title {
    font-size: 15px;
  }
}

/* Redirect Modal Styles */
.aa-redirect-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.aa-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: aa-fadeIn 0.2s ease;
}

.aa-modal-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  max-width: 420px;
  width: 100%;
  overflow: hidden;
  animation: aa-slideUp 0.3s ease;
}

.aa-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aa-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.aa-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.aa-modal-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.aa-modal-body {
  padding: 20px 24px;
  text-align: center;
}

.aa-modal-logo {
  text-align: center;
  margin-bottom: 24px;
  padding: 8px 0;
}

.aa-logo-img {
  height: auto;
  width: auto;
  max-width: 280px;
}

.aa-modal-body p {
  margin: 12px 0;
  color: #6b7280;
  line-height: 1.5;
}

.aa-modal-course {
  background: #f3f4f6;
  color: #111827;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 600;
  margin: 16px 0;
  border-left: 4px solid #6b7280;
}

.aa-modal-note {
  font-size: 14px;
  color: #9ca3af;
  font-style: italic;
}

.aa-modal-actions {
  padding: 16px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.aa-modal-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 100px;
}

.aa-modal-btn-secondary {
  background: #f3f4f6;
  color: #374151;
}

.aa-modal-btn-secondary:hover {
  background: #e5e7eb;
  color: #111827;
}

.aa-modal-btn-primary {
  background: #374151;
  color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.aa-modal-btn-primary:hover {
  background: #111827;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Modal Animations */
@keyframes aa-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes aa-slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes aa-bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* Modal Responsive */
@media (max-width: 480px) {
  .aa-modal-backdrop {
    padding: 16px;
  }
  
  .aa-modal-content {
    max-width: 100%;
  }
  
  .aa-modal-actions {
    flex-direction: column;
  }
  
  .aa-modal-btn {
    width: 100%;
  }
}

/* ===============================================
   TABLE LAYOUT (LEAN & MINIMALIST DESIGN)
   =============================================== */

/* Override course list for table layout */
.aa-courses-list.aa-table-layout {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: white;
  padding: 0;
}

.aa-courses-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0;
}

.aa-courses-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.aa-courses-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  color: #374151;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-right: 1px solid #f1f5f9;
}

.aa-courses-table th:last-child {
  border-right: none;
  text-align: center;
}

.aa-courses-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.aa-courses-table tbody tr:hover {
  background: #f8fafc;
}

.aa-courses-table tbody tr:last-child {
  border-bottom: none;
}

.aa-courses-table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-right: 1px solid #f1f5f9;
}

.aa-courses-table td:last-child {
  border-right: none;
  text-align: center;
}

/* Course Title Column */
.aa-course-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.aa-table-layout .aa-course-logo {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aa-table-layout .aa-logo-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

.aa-course-title-info {
  flex: 1;
  min-width: 0;
}

.aa-table-layout .aa-course-title {
  margin: 0 0 2px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.aa-table-layout .aa-course-title a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.aa-table-layout .aa-course-title a:hover {
  color: #3b82f6;
}

.aa-table-layout .aa-course-level {
  font-size: 11px;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.aa-table-layout .aa-course-badge {
  background: #3b82f6;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-block;
  margin-left: 8px;
}

/* Table Data Cells */
.aa-course-date-cell {
  color: #374151;
  font-weight: 500;
  white-space: nowrap;
  font-size: 13px;
}

.aa-course-location-cell {
  color: #374151;
  font-weight: 500;
  font-size: 13px;
}

.aa-course-language-cell {
  color: #6b7280;
  font-weight: 500;
  font-size: 13px;
}

.aa-course-duration-cell {
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
  font-size: 13px;
}

.aa-course-price-cell {
  text-align: right;
  padding-right: 20px;
}

.aa-table-layout .aa-course-price {
  font-size: 15px;
  font-weight: 700;
  color: #059669;
  margin: 0;
  display: block;
}

.aa-table-layout .aa-course-price-currency {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  margin-left: 2px;
}

.aa-table-layout .aa-early-bird {
  font-size: 10px;
  color: #dc2626;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-top: 1px;
}

.aa-course-action-cell {
  padding: 8px 16px;
}

.aa-table-layout .aa-course-btn {
  background: #3b82f6;
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 12px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 90px;
  text-align: center;
}

.aa-table-layout .aa-course-btn:hover {
  background: #2563eb;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.aa-table-layout .aa-btn-main {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.aa-table-layout .aa-btn-sub {
  font-size: 9px;
  opacity: 0.9;
  font-weight: 400;
  line-height: 1;
}

/* Dark theme for table */
.aa-widget-dark .aa-courses-list.aa-table-layout {
  background: #1f2937;
  border-color: #374151;
}

.aa-widget-dark .aa-courses-table thead {
  background: #374151;
  border-color: #4b5563;
}

.aa-widget-dark .aa-courses-table th {
  color: #f9fafb;
  border-color: #4b5563;
}

.aa-widget-dark .aa-courses-table tbody tr {
  border-color: #374151;
}

.aa-widget-dark .aa-courses-table tbody tr:hover {
  background: #374151;
}

.aa-widget-dark .aa-courses-table td {
  border-color: #374151;
}

.aa-widget-dark .aa-table-layout .aa-course-title a {
  color: #f9fafb;
}

.aa-widget-dark .aa-table-layout .aa-course-title a:hover {
  color: #60a5fa;
}

.aa-widget-dark .aa-course-date-cell,
.aa-widget-dark .aa-course-location-cell {
  color: #e5e7eb;
}

.aa-widget-dark .aa-course-language-cell,
.aa-widget-dark .aa-course-duration-cell {
  color: #9ca3af;
}

/* Responsive table */
@media (max-width: 768px) {
  .aa-courses-table th,
  .aa-courses-table td {
    padding: 8px 12px;
  }
  
  .aa-course-title-cell {
    min-width: 150px;
  }
  
  .aa-table-layout .aa-course-title {
    font-size: 13px;
  }
  
  .aa-table-layout .aa-course-btn {
    min-width: 80px;
    padding: 5px 10px;
  }
}