/* ==========================================================================
   Contact / support flow — choose type, ticket list, new ticket
   Shared by the three pages so the styling stays in one place.
   ========================================================================== */

/* --- Page heading ------------------------------------------------------- */
.contact-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.contact-breadcrumb {
  color: #6c757d;
  font-size: 0.95rem;
}
.contact-breadcrumb a {
  color: #6c757d;
  text-decoration: none;
}
.contact-breadcrumb a:hover {
  color: var(--bs-primary);
}

/* --- Choose type -------------------------------------------------------- */
.choose-type-grid {
  width: 100%;
  max-width: 800px;
}

.choose-type-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem;
  text-align: center;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.choose-type-card:hover,
.choose-type-card:focus-within {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-color: #d0d0d0;
}

.choose-type-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
}
.icon-tech {
  background-color: #e6f8f0;
  color: #198754;
}
.icon-preacher {
  background-color: #e6f0ff;
  color: #0d6efd;
}

.choose-type-title {
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--first-color-dark, #1c3653);
}
.choose-type-text {
  margin-bottom: 0;
  color: #6c757d;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Ticket list -------------------------------------------------------- */
.card-table-container {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
}

.table-custom {
  margin-bottom: 0;
}
.table-custom th {
  padding: 1rem;
  color: var(--first-color-dark, #1c3653);
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 2px solid #e9ecef;
}
.table-custom td {
  padding: 1rem;
  color: #6c757d;
  vertical-align: middle;
  border-bottom: 1px solid #e9ecef;
}
.table-custom tr:last-child td {
  border-bottom: none;
}

.badge-type {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

/* --- New ticket form ---------------------------------------------------- */
.form-card {
  padding: 2rem;
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
}
.form-card .form-label {
  color: var(--first-color-dark, #1c3653);
  font-weight: 600;
  font-size: 0.95rem;
}
.form-card .form-control {
  padding: 0.75rem 1rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}
.form-card .form-control:focus {
  background-color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.1);
}

.info-card {
  padding: 1.5rem;
  background-color: #f1f5f9;
  border: none;
  border-radius: 12px;
}
.info-card h6 {
  margin-bottom: 1rem;
  color: var(--first-color-dark, #1c3653);
  font-weight: 700;
}
.info-list {
  padding-right: 1rem;
  margin-bottom: 0;
  list-style-type: none;
}
.info-list li {
  position: relative;
  margin-bottom: 1rem;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.6;
}
.info-list li::before {
  content: '•';
  position: absolute;
  right: -1rem;
  top: -0.4rem;
  color: #0d6efd;
  font-size: 1.5rem;
}
.info-list li:last-child {
  margin-bottom: 0;
}

/* --- Responsive --------------------------------------------------------- */
@media screen and (max-width: 767.98px) {
  .choose-type-card,
  .form-card {
    padding: 1.25rem;
  }
  .choose-type-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    font-size: 1.25rem;
  }
  .info-card {
    padding: 1.25rem;
  }
  .table-custom th,
  .table-custom td {
    padding: 0.75rem;
  }
  .contact-page-head .btn {
    width: 100%;
    justify-content: center;
  }
  .form-card .form-actions .btn {
    flex: 1 1 auto;
  }
}

/* A four-column table cannot be read on a phone, so the ticket rows become
   stacked cards instead of a horizontal scroll region. */
@media screen and (max-width: 767.98px) {
  .card-table-container .table-responsive {
    overflow-x: visible;
  }
  .table-custom {
    min-width: 0 !important;
  }
  .table-custom thead {
    display: none;
  }
  .table-custom,
  .table-custom tbody,
  .table-custom tr,
  .table-custom td {
    display: block;
    width: 100%;
  }
  .table-custom tr {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
  }
  .table-custom tr:last-child {
    border-bottom: none;
  }
  .table-custom td {
    padding: 0;
    border: none;
  }
  .table-custom td + td {
    margin-top: 0.5rem;
  }
  /* subject line */
  .table-custom td:nth-child(2) strong {
    font-size: 1rem;
    line-height: 1.5;
  }
  /* date */
  .table-custom td:last-child {
    font-size: 0.85rem;
  }
}

/* Between phone and wide desktop the subject column was too narrow and every
   title wrapped to four lines; rebalance against the inline column widths. */
@media screen and (min-width: 768px) and (max-width: 1199.98px) {
  .table-custom th:nth-child(2),
  .table-custom td:nth-child(2) {
    width: 34% !important;
  }
  .table-custom th:nth-child(3),
  .table-custom td:nth-child(3) {
    width: 34% !important;
  }
  .table-custom th:nth-child(4),
  .table-custom td:nth-child(4) {
    width: 17% !important;
  }
}
