/* Mobile sidebar: one-tap drawer. Used on logged-in pages. */

.mobile-nav-backdrop {
  display: none;
}

.notice-count {
  color: #e74c3c;
}

.page-sidebar.menu-compact .notice-count {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 14px;
  padding: 1px 3px;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  background: #e74c3c;
  color: #fff;
  border-radius: 8px;
}

.page-sidebar.menu-compact .notice-count .fa-times {
  display: none;
}

@media (max-width: 880px) {
  .navbar {
    position: relative;
    z-index: 1100;
  }

  .page-sidebar,
  .page-sidebar.hide,
  .page-sidebar.menu-compact {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px !important;
    max-width: 85vw;
    display: block !important;
    z-index: 1050;
    background: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: none;
    padding-top: 45px;
  }

  @media (max-width: 530px) {
    .page-sidebar,
    .page-sidebar.hide,
    .page-sidebar.menu-compact {
      padding-top: 90px;
    }
  }

  .page-sidebar:before,
  .page-sidebar.hide:before,
  .page-sidebar.menu-compact:before {
    display: none !important;
  }

  body.mobile-nav-open .page-sidebar,
  body.mobile-nav-open .page-sidebar.hide,
  body.mobile-nav-open .page-sidebar.menu-compact {
    transform: translateX(0);
    box-shadow: 2px 0 18px rgba(0, 0, 0, 0.2);
  }

  .page-sidebar.menu-compact .sidebar-menu > li > a .menu-text,
  .page-sidebar.menu-compact .sidebar-menu > li > a .menu-expand {
    display: inline-block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    line-height: inherit !important;
    box-shadow: none !important;
    background: transparent !important;
    padding-left: 0 !important;
  }

  .page-content,
  .page-sidebar.hide ~ .page-content,
  .page-sidebar.menu-compact ~ .page-content,
  .page-sidebar.menu-compact.hide ~ .page-content {
    margin-left: 0 !important;
  }

  .mobile-nav-backdrop {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1040;
  }

  body.mobile-nav-open .mobile-nav-backdrop {
    display: block;
  }
}

/* Keep logo, avatar, and hamburger on one row */
@media (max-width: 530px) {
  .navbar {
    height: 45px !important;
    min-height: 45px !important;
  }

  .navbar .navbar-inner {
    min-height: 45px;
  }

  .navbar .navbar-inner .navbar-header {
    float: left !important;
    display: block;
    width: auto !important;
  }

  .navbar .navbar-inner .navbar-header.pull-right {
    float: right !important;
  }

  .navbar .navbar-inner .navbar-header .navbar-account .account-area {
    top: 0 !important;
    right: 50px;
    padding-left: 0;
  }

  .navbar .navbar-inner .navbar-header .navbar-account .account-area .login-area section {
    display: none;
  }

  .navbar-fixed-top + .main-container {
    margin-top: 45px !important;
  }

  .page-sidebar,
  .page-sidebar.hide,
  .page-sidebar.menu-compact {
    padding-top: 45px !important;
  }
}

@media (max-width: 767px) {
  .page-body {
    padding: 10px 8px 20px;
    overflow-x: hidden;
  }

  .navbar .login-area section h2,
  .navbar .login-area .profile {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .orders-container .orders-list .order-item {
    padding-right: 12px;
  }

  .orders-container .orders-list .order-item .row {
    margin-left: 0;
    margin-right: 0;
  }

  .orders-container .orders-list .order-item [class*="col-"] {
    width: 100%;
    max-width: 100%;
    float: none;
    padding-left: 0;
    padding-right: 0;
    text-align: left;
  }

  .orders-container .orders-list .order-item .item-left,
  .orders-container .orders-list .order-item .item-right,
  .orders-container .orders-list .order-item .item-price {
    text-align: left;
    margin: 6px 0 0;
  }

  .orders-container .orders-list .order-item .item-more {
    display: none;
  }

  .orders-container .orders-list .order-item .btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    white-space: normal;
  }

  .orders-container .orders-list .order-item .item-booker,
  .orders-container .orders-list .order-item .item-time {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }

  .panel-heading h3,
  .panel-heading a {
    overflow-wrap: break-word;
  }

  .notices-page h2 {
    font-size: 22px;
    line-height: 1.25;
    overflow-wrap: break-word;
    margin: 0 0 12px;
  }

  .notices-page h3 {
    font-size: 16px;
    line-height: 1.35;
    overflow-wrap: break-word;
  }

  .notices-page .btn-lg {
    display: block;
    width: 100%;
    white-space: normal;
    line-height: 1.3;
    padding: 12px 14px;
    font-size: 16px;
    margin: 8px 0 0;
  }

  .notices-page object,
  .notices-page img {
    max-width: 100% !important;
    height: auto !important;
  }

  .notices-page .modal-dialog {
    width: auto;
    margin: 10px;
  }

  .newsletter-page h2 {
    font-size: 20px;
    line-height: 1.3;
    overflow-wrap: break-word;
  }

  .newsletter-page .widget-main {
    padding: 12px;
  }

  .newsletter-attachments a {
    display: block;
    padding: 10px 0;
    overflow-wrap: anywhere;
  }
}

.rules-list {
  max-width: 100%;
}

.rules-list-title {
  text-align: center;
  margin: 0 0 8px;
  font-size: 22px;
}

.rules-list-intro {
  text-align: center;
  margin: 0 0 16px;
  color: #555;
  line-height: 1.45;
}

.rules-list-items {
  margin: 0;
  padding-left: 1.3em;
}

.rules-list-items li {
  margin-bottom: 12px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.rules-page .widget-main,
.rules-page .panel-body {
  padding: 16px;
}

@media (max-width: 767px) {
  .rules-list-title {
    font-size: 20px;
  }

  .rules-page .widget-main,
  .rules-page .panel-body {
    padding: 12px;
  }

  .rules-list-items {
    padding-left: 1.15em;
  }
}

.notice-image-grid:empty,
.notice-file-list:empty {
  display: none;
}

.notice-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.notice-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notice-document {
  max-width: 100%;
}

.notice-document.is-image {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
}

.notice-document.is-image > a {
  display: block;
}

.notice-document.is-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.notice-document-file {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.notice-document.is-heic {
  border: 1px dashed #bbb;
  border-radius: 6px;
  background: #fafafa;
}

.notice-document-heic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 160px;
  padding: 16px;
}

.notice-document-heic .fa {
  font-size: 32px;
  color: #999;
}

.notice-document-heic p {
  margin: 10px 0 8px;
  font-size: 12px;
  color: #666;
}

.notice-document-meta {
  padding: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #555;
}

.notices-page .widget-main {
  padding: 16px;
}

.notice-action {
  margin-bottom: 20px;
}

.notice-action-copy {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.5;
  color: #444;
}

.notice-status-ok {
  color: green;
  font-size: 16px;
  line-height: 1.4;
}

.notice-header {
  margin-bottom: 20px;
}

.notice-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #777;
}

.notice-header h2 {
  margin: 0 0 12px;
}

.notice-status {
  padding: 12px;
  border-radius: 6px;
  background: #f7f7f7;
}

.notice-status.is-failed {
  background: #fdecea;
}

.notice-status.is-resolved {
  background: #e8f6ec;
}

.notice-status-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 2px;
}

.notice-status-value {
  display: block;
  font-size: 18px;
}

.notice-status.is-failed .notice-status-value {
  color: #c0392b;
}

.notice-status.is-resolved .notice-status-value {
  color: #1e8449;
}

.notice-status small {
  display: block;
  margin-top: 6px;
  line-height: 1.4;
}

.notice-body p {
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 12px;
}

.notice-issue {
  padding: 12px;
  border: 1px solid #eee;
  border-radius: 6px;
  margin: 0 0 12px;
}

.notice-issue h3 {
  margin: 0 0 8px;
}

.notice-issue-desc {
  font-weight: 600;
  margin-bottom: 8px !important;
}

.notice-issue-meta {
  color: #666;
  font-size: 13px !important;
  margin-bottom: 0 !important;
}

.notice-docs-heading {
  margin-top: 8px;
}

@media (max-width: 767px) {
  .notice-image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .notice-document.is-image img {
    height: 130px;
  }

  .notices-page .widget-main {
    padding: 12px;
  }
}

.newsletter-message {
  margin-top: 8px;
  margin-left: 2%;
  width: 98%;
  border: 1px dashed lightgrey;
  padding: 12px;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.newsletter-message img,
.newsletter-message video,
.newsletter-message iframe {
  max-width: 100% !important;
  height: auto !important;
}

.newsletter-message table {
  max-width: 100%;
}

@media (max-width: 767px) {
  .newsletter-message {
    margin-left: 0;
    width: 100%;
  }
}

.profile-page {
  max-width: 100%;
  overflow-x: hidden;
}

.profile-edit-bar {
  margin-bottom: 12px;
}

@media (max-width: 767px) {
  .profile-page .alert h1 {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 8px;
  }

  .profile-page .alert h3,
  .profile-page .alert h4 {
    font-size: 15px;
    line-height: 1.4;
    margin: 0 0 10px;
  }

  .profile-page .alert .btn-lg,
  .profile-page .profile-edit-btn {
    display: block;
    width: 100%;
    white-space: normal;
    margin: 8px 0 0;
  }

  .profile-page .profile-container {
    margin: 0;
  }

  .profile-page .profile-header {
    min-height: 0;
    margin: 0 0 12px;
    padding: 12px 12px 4px;
  }

  .profile-page .profile-header .profile-info,
  .profile-page .profile-header .profile-stats {
    min-height: 0;
    border-right: none;
    padding: 0 0 8px;
    text-align: center;
  }

  .profile-page .profile-header .profile-info .header-fullname {
    margin-top: 0;
    font-size: 20px;
  }

  .profile-page .profile-header .header-information {
    margin-top: 4px;
  }

  .profile-page .profile-header .header-avatar {
    width: 88px;
    height: 88px;
    margin: 8px auto;
  }

  .profile-page .profile-stats .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
  }

  .profile-page .profile-stats .stats-col {
    width: 50%;
    float: none;
    margin: 8px 0 !important;
    border-right: none !important;
    padding: 0 6px;
  }

  .profile-page .profile-stats .stats-value {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .profile-page .tickets-container {
    padding: 0 !important;
  }

  .profile-page .ticket-item {
    padding: 10px 40px 10px 12px;
  }

  .profile-page .ticket-item .row {
    display: flex;
    flex-direction: column;
    margin: 0;
  }

  .profile-page .ticket-item [class*="col-"] {
    width: 100%;
    float: none;
    height: auto;
    padding: 0;
    line-height: 1.4;
    white-space: normal;
  }

  .profile-page .ticket-item .ticket-user {
    height: auto;
    overflow: visible;
    white-space: normal;
    padding: 0 !important;
    order: 2;
  }

  .profile-page .ticket-item .ticket-type {
    height: auto;
    padding: 0 0 4px;
    order: 1;
  }

  .profile-page .ticket-item .ticket-type .divider {
    display: none;
  }

  .profile-page .ticket-item .user-name {
    display: inline;
    overflow-wrap: anywhere;
  }

  .profile-page .ticket-readonly .ticket-state {
    display: none;
  }

  .profile-page .ticket-item .ticket-state.bg-red {
    top: 10px;
    right: 10px;
  }

  .profile-page .ticket-item .item-more {
    position: static;
  }

  .profile-page .profile-add-email-btn {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    margin: 8px 0 4px;
    text-align: center;
  }

  .profile-page .profile-add-email-note {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.4;
  }

  .profile-page #updateModal .modal-dialog {
    width: auto;
    margin: 10px;
  }

  .profile-page .horizontal-space {
    display: none;
  }
}
