/* ============================================================
   RSTickets! Pro - main.css
   Tabulizer themed replacement
   For frontend Help Desk / Knowledgebase / Ticket dashboard
   ============================================================ */


/* ============================================================
   Base variables - Tabulizer visual identity
   ============================================================ */

:root {
  --tab-support-blue: #1769e0;
  --tab-support-blue-2: #2997f2;
  --tab-support-cyan: #08bfc8;
  --tab-support-green: #10b981;
  --tab-support-purple: #7c5ce0;
  --tab-support-orange: #f39c12;
  --tab-support-dark: #101827;
  --tab-support-text: #263244;
  --tab-support-muted: #5b6472;
  --tab-support-border: #dfe7f1;
  --tab-support-border-2: #cfe4ff;
  --tab-support-soft: #eef7ff;
  --tab-support-soft-2: #f8fbff;
  --tab-support-warning: #fff8e6;
  --tab-support-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
  --tab-support-shadow-hover: 0 18px 38px rgba(15, 23, 42, 0.12);
}


/* ============================================================
   Original RSTickets utility rules, preserved
   ============================================================ */

#rst_files_container .rst_file_block {
  display: block;
}

a.rst_flag {
  background: url(../images/favorite.png) no-repeat;
  display: block;
  width: 16px;
  height: 16px;
  padding: 1px;
  margin: 0 auto;
}

a.rst_flag:hover,
a.rst_flag_active {
  background: transparent url(../images/favoritehover.png) no-repeat !important;
  text-decoration: none !important;
}

.rst_delete_ticket,
.rst_notify_ticket {
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
  text-decoration: none !important;
}

.rst_categories {
  list-style: none outside none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.rst_center_block {
  text-align: center;
  display: block !important;
}

.rst_center_block ul {
  text-align: left;
}

.rst_dashboard_center {
  text-align: center;
}

#bulk_actions th {
  border-top: medium none;
}

.media,
.media-body {
  overflow: hidden;
  *overflow: visible;
  zoom: 1;
}

.media,
.media .media {
  margin-top: 15px;
}

.media:first-child {
  margin-top: 0;
}

.media-object {
  display: block;
}

.media-heading {
  margin: 0 0 5px;
}

.media > .pull-left {
  margin-right: 10px;
}

.media > .pull-right {
  margin-left: 10px;
}

.media-list {
  margin-left: 0;
  list-style: none;
}

.com-rsticketspro-has-top-padding {
  padding: 1em 0;
}

.com-rsticketspro-has-top-margin {
  margin: 1em 0;
}

.com-rsticketspro-has-margin {
  margin: 1em;
}

.com-rsticketspro-has-overflow {
  overflow: hidden;
}

.com-rsticketspro-avatar {
  margin: 0.5em;
}

.element-rsinvisible {
  display: none;
}

.rst_custom_field label {
  float: none !important;
  margin-right: 5px;
  display: inline-block !important;
}

#rsticketspro_remove_data_and_close_account {
  display: none;
}

.rst_clear,
.rsticketspro_clear {
  display: block;
  clear: both;
}


/* ============================================================
   General RSTickets frontend look
   ============================================================ */

#rsticketspro_dashboard_search,
#rsticketspro_dashboard_knowledgebase,
#rsticketspro_dashboard_tickets,
.com-rsticketspro,
.com_rsticketspro {
  color: var(--tab-support-text);
  font-size: 16px;
  line-height: 1.65;
}

#rsticketspro_dashboard_search *,
#rsticketspro_dashboard_knowledgebase *,
#rsticketspro_dashboard_tickets * {
  box-sizing: border-box;
}

#rsticketspro_dashboard_search a,
#rsticketspro_dashboard_knowledgebase a,
#rsticketspro_dashboard_tickets a {
  color: var(--tab-support-blue);
  font-weight: 800;
  text-decoration: none;
}

#rsticketspro_dashboard_search a:hover,
#rsticketspro_dashboard_knowledgebase a:hover,
#rsticketspro_dashboard_tickets a:hover {
  color: var(--tab-support-blue-2);
  text-decoration: none;
}


/* ============================================================
   Page headings
   ============================================================ */

body h1,
.com-rsticketspro h1,
.com_rsticketspro h1 {
  color: var(--tab-support-dark);
  font-size: 42px;
  line-height: 1.15;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
}

#rsticketspro_dashboard_knowledgebase h3,
#rsticketspro_dashboard_tickets h3 {
  color: var(--tab-support-dark);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 52px 0 20px;
}


/* ============================================================
   Search box
   Template normally uses:
   .input-append.rst_center_block.well.well-small
   ============================================================ */

#rsticketspro_dashboard_search {
  display: block;
  width: 100%;
  clear: both;
  margin-top: 20px;
  margin-bottom: 42px;
}

#rsticketspro_dashboard_search:after {
  content: "";
  display: table;
  clear: both;
}

#rsticketspro_dashboard_search .well,
#rsticketspro_dashboard_search .well-small,
#rsticketspro_dashboard_search .input-append {
  display: flex !important;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  width: 100%;
  max-width: 920px;
  margin: 0 auto 34px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#rsticketspro_searchinp {
  flex: 1 1 auto;
  width: auto;
  min-height: 46px;
  padding: 11px 15px;
  border: 1px solid var(--tab-support-border);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: #ffffff;
  color: var(--tab-support-text);
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#rsticketspro_searchinp::placeholder {
  color: #9aa5b5;
}

#rsticketspro_searchinp:focus {
  border-color: var(--tab-support-blue-2);
  outline: none;
  box-shadow: 0 0 0 4px rgba(41, 151, 242, 0.14);
}

#rsticketspro_dashboard_search .btn,
#rsticketspro_dashboard_search .btn-primary {
  min-height: 46px;
  padding: 11px 22px;
  border: 0;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(135deg, var(--tab-support-blue), var(--tab-support-blue-2));
  color: #ffffff;
  font-weight: 900;
  font-size: 15px;
  text-shadow: none;
  box-shadow: 0 10px 24px rgba(23, 105, 224, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

#rsticketspro_dashboard_search .btn:hover,
#rsticketspro_dashboard_search .btn-primary:hover,
#rsticketspro_dashboard_search .btn:focus,
#rsticketspro_dashboard_search .btn-primary:focus {
  background: linear-gradient(135deg, #0f5ed1, #1687ee);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(23, 105, 224, 0.30);
  text-decoration: none;
}

#rsticketspro_loading {
  vertical-align: middle;
  margin-right: 6px;
}


/* ============================================================
   Typeahead search dropdown
   ============================================================ */

#rsticketspro_dashboard_search .typeahead,
.typeahead.dropdown-menu {
  border: 1px solid var(--tab-support-border);
  border-radius: 14px;
  padding: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
}

#rsticketspro_dashboard_search .typeahead li > a,
.typeahead.dropdown-menu li > a {
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--tab-support-text);
}

#rsticketspro_dashboard_search .typeahead li > a:hover,
#rsticketspro_dashboard_search .typeahead .active > a,
.typeahead.dropdown-menu li > a:hover,
.typeahead.dropdown-menu .active > a {
  background: var(--tab-support-soft);
  color: var(--tab-support-blue);
}


/* ============================================================
   Dashboard action cards
   Bootstrap 2 compatible flexbox version
   Template uses:
   ul.thumbnails.rst_dashboard_items > li.span4 > .thumbnail
   ============================================================ */

.rst_dashboard_items,
ul.rst_dashboard_items,
ul.thumbnails.rst_dashboard_items {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: stretch !important;
  justify-content: center !important;
  gap: 22px !important;

  width: 100% !important;
  max-width: 100% !important;

  clear: both !important;
  float: none !important;

  margin: 28px 0 56px 0 !important;
  padding: 0 !important;

  list-style: none !important;
  overflow: visible !important;
}

/* Disable old Bootstrap thumbnail clearfix behaviour */
.rst_dashboard_items:before,
.rst_dashboard_items:after,
ul.thumbnails.rst_dashboard_items:before,
ul.thumbnails.rst_dashboard_items:after {
  content: none !important;
  display: none !important;
}

/* Neutralize old Bootstrap 2 span classes */
.rst_dashboard_items > li,
.rst_dashboard_items > li.span4,
ul.thumbnails.rst_dashboard_items > li,
ul.thumbnails.rst_dashboard_items > li.span4 {
  float: none !important;
  display: flex !important;

  width: auto !important;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;

  flex: 1 1 280px !important;
  min-width: 260px !important;
  max-width: 360px !important;
}

/* Card */
.rst_dashboard_items .thumbnail {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;

  width: 100% !important;
  min-height: 245px !important;
  height: auto !important;

  padding: 30px 24px !important;

  border: 1px solid var(--tab-support-border) !important;
  border-radius: 20px !important;

  background:
    radial-gradient(circle at 50% 0%, rgba(41, 151, 242, 0.08), transparent 38%),
    #ffffff !important;

  box-shadow: var(--tab-support-shadow) !important;
  text-align: center !important;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease !important;
}

.rst_dashboard_items .thumbnail:hover {
  transform: translateY(-4px);
  border-color: var(--tab-support-blue-2) !important;
  box-shadow: var(--tab-support-shadow-hover) !important;
}

/* Icon wrapper */
.rst_dashboard_items .thumbnail > a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 74px !important;
  height: 74px !important;

  margin: 0 auto 18px auto !important;
  padding: 0 !important;

  border-radius: 22px !important;
  background: linear-gradient(
    135deg,
    rgba(41, 151, 242, 0.12),
    rgba(8, 191, 200, 0.10)
  ) !important;

  text-align: center !important;
}

.rst_dashboard_items .thumbnail > a img {
  display: block !important;
  max-width: 42px !important;
  max-height: 42px !important;
  margin: 0 !important;
  filter: saturate(1.08);
}

/* Text */
.rst_dashboard_items .caption {
  padding: 0 !important;
  width: 100% !important;
}

.rst_dashboard_items .caption > h3,
.rst_dashboard_items .caption h3 {
  margin: 0 0 12px 0 !important;
  text-align: center !important;
  font-size: 24px !important;
  line-height: 1.2 !important;
}

.rst_dashboard_items .caption h3 a {
  color: var(--tab-support-blue) !important;
  font-weight: 900 !important;
  text-decoration: none !important;
}

.rst_dashboard_items .caption h3 a:hover {
  color: var(--tab-support-blue-2) !important;
  text-decoration: none !important;
}

.rst_dashboard_items .caption p {
  margin: 0 !important;
  color: var(--tab-support-muted) !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  text-align: center !important;
}

/* Different icon backgrounds */
.rst_dashboard_items > li:nth-child(1) .thumbnail > a {
  background: rgba(41, 151, 242, 0.13) !important;
}

.rst_dashboard_items > li:nth-child(2) .thumbnail > a {
  background: rgba(16, 185, 129, 0.13) !important;
}

.rst_dashboard_items > li:nth-child(3) .thumbnail > a {
  background: rgba(8, 191, 200, 0.13) !important;
}


/* ============================================================
   Knowledgebase
   ============================================================ */

#rsticketspro_dashboard_knowledgebase {
  margin-top: 12px;
}

#rsticketspro_dashboard_knowledgebase .row-fluid {
  margin-bottom: 18px;
}

#rsticketspro_dashboard_knowledgebase .span4 {
  margin-bottom: 18px;
}

.rst_dashboard_kb,
#rsticketspro_dashboard_knowledgebase .well,
#rsticketspro_dashboard_knowledgebase .well-small {
  min-height: 0 !important;
  padding: 22px;
  border: 1px solid var(--tab-support-border);
  border-radius: 18px;
  background: var(--tab-support-soft-2);
  box-shadow: var(--tab-support-shadow);
}

.rst_dashboard_kb strong {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 18px;
}

.rst_dashboard_kb img {
  max-width: 34px;
  max-height: 34px;
}

.rst_dashboard_kb a {
  color: var(--tab-support-blue);
  font-weight: 900;
}

.rst_dashboard_kb div {
  color: var(--tab-support-muted);
  font-size: 15px;
}


/* ============================================================
   Empty states / login prompt
   ============================================================ */

.rst_dashboard_center,
#rsticketspro_dashboard_knowledgebase .rst_dashboard_center,
#rsticketspro_dashboard_tickets .rst_dashboard_center {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 26px;
  border: 1px dashed #9cc7f2;
  border-radius: 20px;
  background:
    radial-gradient(circle at 18% 20%, rgba(41, 151, 242, 0.12), transparent 34%),
    radial-gradient(circle at 90% 80%, rgba(8, 191, 200, 0.10), transparent 32%),
    var(--tab-support-soft-2);
  box-shadow: none;
  text-align: center;
  color: var(--tab-support-muted);
}

.rst_dashboard_center p {
  margin: 0 0 10px;
}

.rst_dashboard_center p:last-child {
  margin-bottom: 0;
}

.rst_dashboard_center img {
  vertical-align: middle;
  margin-right: 6px;
}

.rst_dashboard_center a {
  color: var(--tab-support-blue);
  font-weight: 900;
}


/* ============================================================
   My tickets table
   ============================================================ */

#rsticketspro_dashboard_tickets table.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--tab-support-border);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--tab-support-shadow);
}

#rsticketspro_dashboard_tickets table.table td,
#rsticketspro_dashboard_tickets table.table th {
  padding: 14px 16px;
  border-color: #e8eef6;
  color: var(--tab-support-text);
  vertical-align: middle;
}

#rsticketspro_dashboard_tickets table.table tr:first-child td {
  background: #eef7ff;
  color: #1769aa;
  font-weight: 900;
}

#rsticketspro_dashboard_tickets table.table a {
  color: var(--tab-support-blue);
  font-weight: 800;
}

#rsticketspro_dashboard_tickets .rsticketspro_smallicon {
  margin-right: 7px;
  vertical-align: middle;
}


/* ============================================================
   General RSTickets forms
   Useful for submit/search/ticket views loaded by same main.css
   ============================================================ */

.com-rsticketspro input[type="text"],
.com-rsticketspro input[type="email"],
.com-rsticketspro input[type="password"],
.com-rsticketspro select,
.com-rsticketspro textarea,
.com_rsticketspro input[type="text"],
.com_rsticketspro input[type="email"],
.com_rsticketspro input[type="password"],
.com_rsticketspro select,
.com_rsticketspro textarea,
#rsticketspro_dashboard_search input[type="text"],
#rsticketspro_dashboard_knowledgebase input[type="text"],
#rsticketspro_dashboard_tickets input[type="text"] {
  min-height: 42px;
  border: 1px solid var(--tab-support-border);
  border-radius: 10px;
  padding: 9px 12px;
  background: #ffffff;
  color: var(--tab-support-text);
  box-shadow: none;
}

.com-rsticketspro input:focus,
.com-rsticketspro select:focus,
.com-rsticketspro textarea:focus,
.com_rsticketspro input:focus,
.com_rsticketspro select:focus,
.com_rsticketspro textarea:focus {
  border-color: var(--tab-support-blue-2);
  outline: none;
  box-shadow: 0 0 0 4px rgba(41, 151, 242, 0.14);
}

.com-rsticketspro .btn,
.com_rsticketspro .btn,
.com-rsticketspro button,
.com_rsticketspro button,
.com-rsticketspro input[type="submit"],
.com_rsticketspro input[type="submit"] {
  border-radius: 10px;
  font-weight: 900;
  text-shadow: none;
}

.com-rsticketspro .btn-primary,
.com_rsticketspro .btn-primary {
  border: 0;
  background: linear-gradient(135deg, var(--tab-support-blue), var(--tab-support-blue-2));
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 105, 224, 0.24);
}

.com-rsticketspro .btn-primary:hover,
.com_rsticketspro .btn-primary:hover {
  background: linear-gradient(135deg, #0f5ed1, #1687ee);
  color: #ffffff;
}


/* ============================================================
   Magnific popup container used by RSTickets
   Keep this here because original main.css included it
   ============================================================ */

.rst-magnific-popup {
  background: #ffffff;
  margin: 20px auto;
  padding: 28px;
  position: relative;
  width: min(900px, 92%) !important;
  border-radius: 20px;
  border: 1px solid var(--tab-support-border);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.rst-magnific-popup iframe {
  width: 100%;
  border: 0;
}


/* ============================================================
   Responsive behaviour
   ============================================================ */

@media (max-width: 900px) {
  #rsticketspro_dashboard_search .well,
  #rsticketspro_dashboard_search .well-small,
  #rsticketspro_dashboard_search .input-append {
    flex-direction: column;
    gap: 10px;
  }

  #rsticketspro_searchinp {
    width: 100%;
    border-right: 1px solid var(--tab-support-border);
    border-radius: 12px;
  }

  #rsticketspro_dashboard_search .btn,
  #rsticketspro_dashboard_search .btn-primary {
    width: 100%;
    border-radius: 12px;
  }

  .rst_dashboard_items,
  ul.rst_dashboard_items,
  ul.thumbnails.rst_dashboard_items {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .rst_dashboard_items > li,
  .rst_dashboard_items > li.span4,
  ul.thumbnails.rst_dashboard_items > li,
  ul.thumbnails.rst_dashboard_items > li.span4 {
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }
}

@media (max-width: 767px) {
  .rst-magnific-popup {
    width: 88% !important;
  }

  #rsticketspro_dashboard_knowledgebase .span4 {
    width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 560px) {
  body h1,
  .com-rsticketspro h1,
  .com_rsticketspro h1 {
    font-size: 34px;
  }

  #rsticketspro_dashboard_knowledgebase h3,
  #rsticketspro_dashboard_tickets h3 {
    font-size: 24px;
  }

  .rst_dashboard_items .thumbnail {
    min-height: 0 !important;
    padding: 24px 20px !important;
  }

  .rst_dashboard_items .caption h3 {
    font-size: 22px !important;
  }

  .rst_dashboard_center,
  #rsticketspro_dashboard_knowledgebase .rst_dashboard_center,
  #rsticketspro_dashboard_tickets .rst_dashboard_center {
    padding: 24px 18px;
  }
}

@media (max-width: 480px) {
  .rst-magnific-popup {
    width: 92% !important;
  }
}

@media (max-width: 320px) {
  .rst-magnific-popup {
    width: 96% !important;
  }
}

.rst_dashboard_items .thumbnail > a.rst-dashboard-link .icon-pill {
  font-size: 34px !important;
  line-height: 1 !important;
  margin-right: 17px;
  margin-bottom: 17px;
}

.rst_dashboard_items .rst-helpdesk-icon-pill::before,
.rst_dashboard_items .rst-helpdesk-icon-pill::after {
  content: none !important;
  display: none !important;
}
