/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  overflow-x: hidden;
}
.accordion-body{
  text-align: justify;
}
.card-body2{
  background-color:grey;
}

.container {
  flex-grow: 1;
  margin: 15px;
  width: 100%;
  max-width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

/* Responsive Navbar */
.navbar {
  padding: 0.5rem 1rem;
}

.navbar-brand {
  font-size: 1.2rem;
  flex-wrap: wrap;
}

.badge-rejected{
  color:red;
  text-transform: uppercase;
}

.badge-review{
  color:orange;
  text-transform: uppercase;
}

.badge-success{
  color:green;
  text-transform: uppercase;
}

.navbar-brand img {
  height: 60px;
  max-width: 100%;
}

.form-check-label{
  font-weight: 500;
}

.navbar-brand span {
  font-size: 1rem;
  line-height: 1.2;
}

/* Uniform Button Sizing */
.btn-uniform {
  display: inline-block;
  width: 280px;
  height: 45px;
  padding: 0.5rem 1rem;
  line-height: 1.2;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: center;
  vertical-align: middle;
}

/* Responsive Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
}

table td, table th {
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 100px;
  padding: 0.75rem;
}

/* Cards */
.card {
  margin-bottom: 1rem;
  word-wrap: break-word;
  height: 200px;
  display: flex;
  flex-direction: column;
}

.card-header {
  border-bottom: 3px solid #0d6efd !important;
  background-color: transparent !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  padding: 0.75rem 1rem !important;
}

.card-body {
  padding: 1rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* align-items: center; */
}

/* Forms */
.form-control, .form-select {
  width: 100%;
  max-width: 100%;
}

.form-group {
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0.25rem;
}

.btn-group {
  flex-wrap: wrap;
}

/* Accordion */
.accordion {
  margin-bottom: 1rem;
}

.accordion-button {
  font-size: 1rem;
  padding: 0.75rem 1rem;
  word-wrap: break-word;
}

.accordion-body {
  padding: 1rem;
}

/* Alerts */
.alert {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Badge */
.badge {
  word-wrap: break-word;
  white-space: normal;
  display: inline-block;
}

/* Leaderboard Table Adjustments */
.leaderboard-table {
  font-size: 0.9rem;
}

.leaderboard-table td, 
.leaderboard-table th {
  padding: 0.5rem;
  min-width: 80px;
}

/* Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
  .session-card {
    margin-bottom: 1rem;
  }

  .session-card-header {
    padding: 1rem;
    flex-direction: column;
    text-align: center;
  }

  .session-card-header-icon {
    font-size: 1.5rem;
  }

  .session-card-header-title {
    font-size: 1.1rem;
  }

  .session-card-body {
    padding: 1rem;
  }

  .session-info-row {
    flex-direction: column;
    text-align: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
  }

  .session-button-group {
    gap: 0.5rem;
  }

  .session-btn {
    min-width: 100px;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .container {
    margin: 10px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .navbar-brand {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .navbar-brand img {
    height: 50px;
    margin-bottom: 0.5rem;
  }

  .navbar-brand span {
    font-size: 0.9rem;
    margin-left: 0 !important;
  }

  .nav {
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
  }

  .nav-item {
    margin-top: 0.5rem;
  }

  /* Responsive table for mobile */
  .table-responsive {
    font-size: 0.85rem;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  table td, table th {
    min-width: 80px;
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  /* Stack form groups vertically */
  .row > [class*='col-'] {
    margin-bottom: 1rem;
  }

  /* Adjust button sizes */
  .btn {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  /* Card adjustments */
  .card-body {
    padding: 0.75rem;
  }

  .card-header {
    font-size: 0.95rem;
    padding: 0.75rem;
  }

  /* Accordion adjustments */
  .accordion-button {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }

  .accordion-body {
    padding: 0.75rem;
    font-size: 0.9rem;
  }

  /* Leaderboard mobile adjustments */
  .leaderboard-table {
    font-size: 0.75rem;
  }

  .leaderboard-table td,
  .leaderboard-table th {
    padding: 0.35rem;
    min-width: 60px;
  }

  /* Badge adjustments */
  .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  /* Form control adjustments */
  .form-control, .form-select {
    font-size: 0.9rem;
  }

  /* Alert adjustments */
  .alert {
    font-size: 0.9rem;
    padding: 0.75rem;
  }

  /* Hide long text on mobile */
  .mobile-truncate {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Tablet Styles (max-width: 992px) */
@media (max-width: 992px) and (min-width: 769px) {
  .navbar-brand img {
    height: 65px;
  }

  .navbar-brand span {
    font-size: 1rem;
  }

  table td, table th {
    min-width: 90px;
    padding: 0.65rem;
    font-size: 0.9rem;
  }

  .card-body {
    padding: 0.875rem;
  }

  .btn {
    font-size: 0.9rem;
  }
}

/* Small Mobile Styles (max-width: 576px) */
@media (max-width: 576px) {
  .container {
    margin: 5px;
    padding-left: 5px;
    padding-right: 5px;
  }

  .navbar {
    padding: 0.5rem;
  }

  .navbar-brand img {
    height: 40px;
  }

  .navbar-brand span {
    font-size: 0.8rem;
  }

  h1, h2, h3, h4, h5, h6 {
    font-size: calc(100% + 0.2rem);
  }

  table td, table th {
    min-width: 70px;
    padding: 0.4rem;
    font-size: 0.75rem;
  }

  .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }

  .card-header {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  .card-body {
    padding: 0.5rem;
  }

  .accordion-button {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
  }

  .accordion-body {
    padding: 0.5rem;
    font-size: 0.85rem;
  }

  .leaderboard-table {
    font-size: 0.7rem;
  }

  .leaderboard-table td,
  .leaderboard-table th {
    padding: 0.25rem;
    min-width: 50px;
  }

  .form-control, .form-select {
    font-size: 0.85rem;
    padding: 0.5rem;
  }

  .badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 600px) and (orientation: landscape) {
  .navbar-brand img {
    height: 40px;
  }

  .container {
    margin: 5px;
  }
}

/* Session Cards - New Premium Style */
.session-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.session-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.session-card-header {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  gap: 15px;
}

.session-card-header-icon {
  font-size: 2rem;
  opacity: 0.9;
}

.session-card-header-title {
  flex: 1;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.session-card-body {
  padding: 1.5rem;
}

.session-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: background 0.3s ease;
}

.session-info-row:hover {
  background: rgba(255, 255, 255, 0.1);
}

.session-info-icon {
  font-size: 1.3rem;
  min-width: 24px;
  text-align: center;
  opacity: 0.85;
}

.session-info-content {
  flex: 1;
}

.session-info-label {
  font-size: 0.85rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-info-value {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.25rem;
}

.session-button-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.session-btn {
  flex: 1;
  min-width: 120px;
  padding: 0.75rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.session-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.session-btn-primary {
  background: rgba(255, 255, 255, 0.25);
  border-color: white;
}

.session-btn-primary:hover {
  background: white;
  color: #667eea;
}

/* Alternative gradient variations */
.session-card.session-card-success {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  box-shadow: 0 8px 20px rgba(67, 233, 123, 0.3);
}

.session-card.session-card-success:hover {
  box-shadow: 0 12px 30px rgba(67, 233, 123, 0.5);
}

.session-card.session-card-warning {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  box-shadow: 0 8px 20px rgba(250, 112, 154, 0.3);
}

.session-card.session-card-warning:hover {
  box-shadow: 0 12px 30px rgba(250, 112, 154, 0.5);
}

.session-card.session-card-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  box-shadow: 0 8px 20px rgba(255, 107, 107, 0.3);
}

.session-card.session-card-danger:hover {
  box-shadow: 0 12px 30px rgba(255, 107, 107, 0.5);
}

.session-card.session-card-info {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 8px 20px rgba(79, 172, 254, 0.3);
}

.session-card.session-card-info:hover {
  box-shadow: 0 12px 30px rgba(79, 172, 254, 0.5);
}

/* Utility classes for responsive behavior */
.text-truncate-mobile {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .text-truncate-mobile {
    max-width: 150px;
  }
}

/* Sticky table headers on mobile for better scrolling */
@media (max-width: 768px) {
  .table-responsive {
    position: relative;
  }

  .table-responsive thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #343a40;
    color: white;
  }
}

/* Better spacing for mobile buttons in cards */
@media (max-width: 768px) {
  .card .btn-group-vertical {
    width: 100%;
  }

  .card .btn-group-vertical .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Improve readability of long email addresses on mobile */
@media (max-width: 768px) {
  td, th {
    word-break: break-word;
    hyphens: auto;
  }
}

/* Print styles */
@media print {
  .navbar, .btn, .accordion-button {
    display: none;
  }

  .container {
    margin: 0;
    padding: 0;
  }

  table {
    page-break-inside: avoid;
  }
}
