/* page-tickets.css — /tickets */

[hidden]{display:none !important}

.tickets-state{
  padding:24px;
  border:1px solid rgba(255,255,255,.075);
  background:
    radial-gradient(circle at 90% 0%,rgba(164,78,255,.08),transparent 32%),
    rgba(255,255,255,.018);
}

.tickets-state-title{
  font-family:var(--display);
  color:#fff;
  font-size:14px;
  letter-spacing:.07em;
}

.tickets-state-text{
  margin-top:7px;
  color:var(--muted);
  font-size:13px;
  line-height:1.6;
}

.tickets-login-btn{
  display:inline-flex;
  margin-top:16px;
  padding:12px 18px !important;
  text-decoration:none;
}

.tickets-app{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.tickets-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 15px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:11px;
  background:
    linear-gradient(90deg,rgba(255,122,26,.045),rgba(166,73,255,.04));
}

.tickets-profile{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.tickets-avatar-wrap{
  position:relative;
  width:42px;
  height:42px;
  flex:0 0 42px;
}

.tickets-avatar{
  display:block;
  width:42px;
  height:42px;
  border:1px solid rgba(255,122,26,.4);
  border-radius:50%;
  object-fit:cover;
}

.tickets-online-dot{
  position:absolute;
  right:-1px;
  bottom:1px;
  width:9px;
  height:9px;
  border:2px solid #111019;
  border-radius:50%;
  background:#62d98d;
}

.tickets-profile-meta{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:2px;
}

.tickets-profile-kicker{
  color:rgba(255,255,255,.36);
  font-size:8px;
  font-weight:800;
  letter-spacing:.12em;
}

.tickets-profile-meta strong{
  overflow:hidden;
  color:#fff;
  font-size:13px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.tickets-user-steam{
  color:rgba(255,255,255,.38);
  font-size:10px;
}

.tickets-new-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:39px;
  padding:0 15px;
  border:1px solid rgba(255,122,26,.32);
  border-radius:8px;
  background:rgba(255,122,26,.065);
  color:#ffad71;
  text-decoration:none;
  font-family:var(--display);
  font-size:10px;
  font-weight:800;
  letter-spacing:.08em;
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
}

.tickets-new-btn:hover{
  transform:translateY(-1px);
  border-color:rgba(255,122,26,.55);
  background:rgba(255,122,26,.11);
}

.tickets-shell{
  display:grid;
  grid-template-columns:minmax(285px,340px) minmax(0,1fr);
  gap:16px;
  align-items:stretch;
  min-height:620px;
}

.tickets-list-panel,
.ticket-detail-panel{
  position:relative;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.075);
  background:
    radial-gradient(circle at 90% 0%,rgba(160,74,255,.06),transparent 28%),
    linear-gradient(145deg,rgba(255,255,255,.024),rgba(255,255,255,.012));
}

.tickets-list-panel{
  display:flex;
  flex-direction:column;
  padding:0 !important;
}

.tickets-list-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:20px 18px 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.tickets-eyebrow{
  display:block;
  margin-bottom:4px;
  color:#bd74ff;
  font-size:8px;
  font-weight:800;
  letter-spacing:.13em;
}

.tickets-list-head h2,
.ticket-reply-head h3{
  margin:0;
  color:#fff;
  font-family:var(--display);
  font-size:14px;
  letter-spacing:.045em;
}

.tickets-refresh-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:8px;
  background:rgba(255,255,255,.025);
  color:rgba(255,255,255,.68);
  cursor:pointer;
  font-size:17px;
  transition:border-color .18s ease,color .18s ease,background .18s ease;
}

.tickets-refresh-btn:hover{
  border-color:rgba(188,102,255,.38);
  background:rgba(188,102,255,.07);
  color:#fff;
}

.tickets-refresh-btn.is-spinning{
  animation:tickets-spin .45s linear;
}

@keyframes tickets-spin{
  to{transform:rotate(360deg)}
}

.tickets-list-message{
  padding:18px;
  color:var(--muted);
  font-size:12px;
}

.tickets-list{
  display:flex;
  flex:1;
  min-height:0;
  flex-direction:column;
  gap:7px;
  padding:10px;
  overflow-y:auto;
}

.ticket-list-item{
  position:relative;
  width:100%;
  padding:13px 13px 12px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:9px;
  background:rgba(255,255,255,.018);
  color:#fff;
  cursor:pointer;
  text-align:left;
  transition:border-color .18s ease,background .18s ease,transform .18s ease;
}

.ticket-list-item:hover{
  transform:translateX(1px);
  border-color:rgba(181,92,255,.25);
  background:rgba(181,92,255,.035);
}

.ticket-list-item.active{
  border-color:rgba(188,91,255,.42);
  background:
    linear-gradient(110deg,rgba(255,122,26,.055),rgba(177,77,255,.075));
  box-shadow:inset 2px 0 0 #bd5bff;
}

.ticket-list-item-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.ticket-list-category{
  color:#c98cff;
  font-size:8px;
  font-weight:800;
  letter-spacing:.11em;
}

.ticket-list-status,
.ticket-status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:22px;
  padding:0 7px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:999px;
  font-size:7.5px;
  font-weight:800;
  letter-spacing:.08em;
}

.status-open{
  border-color:rgba(90,194,255,.23);
  background:rgba(90,194,255,.065);
  color:#80d4ff;
}

.status-replied{
  border-color:rgba(116,223,157,.23);
  background:rgba(116,223,157,.065);
  color:#83e7a8;
}

.status-waiting-user{
  border-color:rgba(255,177,74,.25);
  background:rgba(255,177,74,.075);
  color:#ffc06f;
}

.status-closed{
  border-color:rgba(255,255,255,.11);
  background:rgba(255,255,255,.04);
  color:rgba(255,255,255,.5);
}

.ticket-list-subject{
  overflow:hidden;
  margin-top:8px;
  color:#fff;
  font-size:12px;
  font-weight:700;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.ticket-list-preview{
  display:-webkit-box;
  overflow:hidden;
  margin-top:5px;
  color:rgba(255,255,255,.4);
  font-size:10.5px;
  line-height:1.45;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

.ticket-list-bottom{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:9px;
  color:rgba(255,255,255,.28);
  font-size:9px;
}

.ticket-list-bottom > span:nth-child(2){
  margin-left:auto;
}

.ticket-unread-badge{
  flex:0 0 auto;
  padding:3px 5px;
  border-radius:4px;
  background:#b45cff;
  color:#fff !important;
  font-size:7px;
  font-weight:900;
  letter-spacing:.07em;
}

.tickets-empty{
  margin:auto 14px;
  padding:28px 18px;
  text-align:center;
}

.tickets-empty-icon{
  color:#b96bff;
  font-size:30px;
}

.tickets-empty-title{
  margin-top:10px;
  color:#fff;
  font-family:var(--display);
  font-size:13px;
  letter-spacing:.07em;
}

.tickets-empty p{
  margin:7px 0 14px;
  color:var(--muted);
  font-size:11px;
}

.tickets-empty-link{
  color:#d59cff;
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
  text-decoration:none;
}

.ticket-detail-panel{
  padding:0 !important;
}

.ticket-placeholder{
  display:flex;
  min-height:620px;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  padding:28px;
  text-align:center;
}

.ticket-placeholder-icon{
  color:rgba(190,95,255,.45);
  font-size:38px;
}

.ticket-placeholder-title{
  margin-top:12px;
  color:#fff;
  font-family:var(--display);
  font-size:14px;
  letter-spacing:.07em;
}

.ticket-placeholder p{
  max-width:360px;
  margin:8px 0 0;
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
}

.ticket-detail-loading{
  min-height:620px;
  padding:24px;
}

.ticket-loading-bar,
.ticket-loading-box{
  border-radius:7px;
  background:linear-gradient(90deg,rgba(255,255,255,.025),rgba(255,255,255,.055),rgba(255,255,255,.025));
  background-size:220% 100%;
  animation:ticket-shimmer 1.2s linear infinite;
}

.ticket-loading-bar{
  width:70%;
  height:16px;
  margin-bottom:10px;
}

.ticket-loading-bar.short{width:40%}

.ticket-loading-box{
  height:340px;
  margin-top:24px;
}

@keyframes ticket-shimmer{
  to{background-position:-220% 0}
}

.ticket-detail-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  padding:22px 24px 18px;
  border-bottom:1px solid rgba(255,255,255,.065);
}

.ticket-detail-meta-top{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}

.ticket-category-pill{
  display:inline-flex;
  align-items:center;
  min-height:23px;
  padding:0 8px;
  border:1px solid rgba(255,122,26,.25);
  border-radius:999px;
  background:rgba(255,122,26,.065);
  color:#ff9d56;
  font-size:7.5px;
  font-weight:800;
  letter-spacing:.09em;
}

.ticket-detail-title-wrap h2{
  margin:0;
  color:#fff;
  font-family:var(--display);
  font-size:18px;
  letter-spacing:.035em;
}

.ticket-detail-submeta{
  display:flex;
  align-items:center;
  gap:7px;
  margin-top:7px;
  color:rgba(255,255,255,.36);
  font-size:9.5px;
}

.ticket-meta-dot{opacity:.45}

.ticket-close-btn{
  flex:0 0 auto;
  min-height:34px;
  padding:0 12px;
  border:1px solid rgba(255,102,102,.2);
  border-radius:7px;
  background:rgba(255,102,102,.045);
  color:#ff9999;
  cursor:pointer;
  font-family:var(--display);
  font-size:8px;
  font-weight:800;
  letter-spacing:.075em;
  transition:border-color .18s ease,background .18s ease,color .18s ease;
}

.ticket-close-btn:hover{
  border-color:rgba(255,102,102,.42);
  background:rgba(255,102,102,.08);
  color:#ffb1b1;
}

.ticket-close-btn:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.ticket-closed-notice{
  margin:16px 24px 0;
  padding:11px 13px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:8px;
  background:rgba(255,255,255,.025);
  color:rgba(255,255,255,.52);
  font-size:10.5px;
  line-height:1.5;
}

.ticket-messages{
  display:flex;
  min-height:300px;
  max-height:460px;
  flex-direction:column;
  gap:13px;
  padding:22px 24px;
  overflow-y:auto;
}

.ticket-message{
  max-width:min(78%,720px);
  padding:12px 14px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:10px;
}

.ticket-message.from-user{
  align-self:flex-end;
  border-color:rgba(181,88,255,.15);
  background:linear-gradient(135deg,rgba(181,88,255,.07),rgba(255,122,26,.035));
}

.ticket-message.from-admin{
  align-self:flex-start;
  border-color:rgba(92,184,255,.14);
  background:rgba(92,184,255,.04);
}

.ticket-message-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
}

.ticket-message-sender{
  font-size:8px;
  font-weight:900;
  letter-spacing:.11em;
}

.from-user .ticket-message-sender{color:#c68cff}
.from-admin .ticket-message-sender{color:#83ceff}

.ticket-message-date{
  color:rgba(255,255,255,.28);
  font-size:8.5px;
}

.ticket-message-body{
  color:rgba(255,255,255,.78);
  font-size:12px;
  line-height:1.62;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

.ticket-no-messages{
  margin:auto;
  color:var(--muted);
  font-size:11px;
}

.ticket-reply-form{
  margin:0 24px 24px;
  padding:17px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:11px;
  background:rgba(5,5,10,.18);
}

.ticket-reply-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:11px;
}

.ticket-reply-count{
  color:rgba(255,255,255,.32);
  font-size:9px;
  font-variant-numeric:tabular-nums;
}

.ticket-reply-textarea{
  width:100%;
  min-height:110px;
  padding:13px 14px;
  border:1px solid rgba(255,255,255,.095);
  border-radius:8px;
  outline:none;
  background:rgba(255,255,255,.018);
  color:#fff;
  font-family:var(--body);
  font-size:12.5px;
  line-height:1.55;
  resize:vertical;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}

.ticket-reply-textarea::placeholder{color:rgba(255,255,255,.27)}

.ticket-reply-textarea:focus{
  border-color:rgba(185,88,255,.46);
  background:rgba(255,255,255,.025);
  box-shadow:0 0 0 3px rgba(177,77,255,.05);
}

.ticket-reply-status{
  min-height:18px;
  margin-top:8px;
  font-size:10.5px;
}

.ticket-reply-status.is-success{color:#78e2a2}
.ticket-reply-status.is-error{color:#ff8585}

.ticket-reply-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:2px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.055);
  color:rgba(255,255,255,.32);
  font-size:9.5px;
}

.ticket-reply-submit{
  flex:0 0 auto;
  min-width:145px;
  padding:11px 18px !important;
}

.ticket-reply-submit:disabled{
  opacity:.55;
  cursor:not-allowed;
}

@media (max-width:900px){
  .tickets-shell{
    grid-template-columns:1fr;
    min-height:0;
  }

  .tickets-list-panel{
    max-height:360px;
  }

  .tickets-list{
    max-height:280px;
  }

  .ticket-placeholder,
  .ticket-detail-loading{
    min-height:420px;
  }
}

@media (max-width:680px){
  .tickets-toolbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .tickets-new-btn{
    width:100%;
  }

  .ticket-detail-head{
    align-items:stretch;
    flex-direction:column;
    padding:18px;
  }

  .ticket-close-btn{
    width:100%;
  }

  .ticket-messages{
    min-height:260px;
    max-height:none;
    padding:18px;
  }

  .ticket-message{
    max-width:92%;
  }

  .ticket-reply-form{
    margin:0 18px 18px;
  }

  .ticket-reply-footer{
    align-items:stretch;
    flex-direction:column;
  }

  .ticket-reply-submit{
    width:100%;
  }
}


/* Custom close-ticket confirmation */
.ticket-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
}
.ticket-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(3,3,8,.76);
  backdrop-filter:blur(7px);
}
.ticket-modal-card{
  position:relative;
  z-index:1;
  width:min(440px,100%);
  padding:24px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:14px;
  background:
    radial-gradient(circle at 90% 0%,rgba(184,81,255,.11),transparent 34%),
    #111019;
  box-shadow:0 24px 70px rgba(0,0,0,.55);
}
.ticket-modal-icon{
  display:flex;
  width:38px;
  height:38px;
  align-items:center;
  justify-content:center;
  margin-bottom:15px;
  border:1px solid rgba(255,102,102,.22);
  border-radius:10px;
  background:rgba(255,102,102,.07);
  color:#ff9a9a;
  font-size:24px;
  line-height:1;
}
.ticket-modal-copy h2{
  margin:0;
  color:#fff;
  font-family:var(--display);
  font-size:18px;
  letter-spacing:.04em;
}
.ticket-modal-copy p{
  margin:9px 0 0;
  color:rgba(255,255,255,.5);
  font-size:12px;
  line-height:1.6;
}
.ticket-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:22px;
  padding-top:17px;
  border-top:1px solid rgba(255,255,255,.065);
}
.ticket-modal-secondary,
.ticket-modal-danger{
  min-height:38px;
  padding:0 15px;
  border-radius:8px;
  cursor:pointer;
  font-family:var(--display);
  font-size:9px;
  font-weight:800;
  letter-spacing:.07em;
}
.ticket-modal-secondary{
  border:1px solid rgba(255,255,255,.1);
  background:rgba(255,255,255,.025);
  color:rgba(255,255,255,.65);
}
.ticket-modal-secondary:hover{
  border-color:rgba(255,255,255,.18);
  background:rgba(255,255,255,.045);
  color:#fff;
}
.ticket-modal-danger{
  border:1px solid rgba(255,92,92,.3);
  background:rgba(255,92,92,.09);
  color:#ff9e9e;
}
.ticket-modal-danger:hover{
  border-color:rgba(255,92,92,.52);
  background:rgba(255,92,92,.14);
  color:#ffc0c0;
}
.ticket-modal-danger:disabled{
  opacity:.5;
  cursor:not-allowed;
}
body.ticket-modal-open{overflow:hidden}

/* Manual refresh cooldown */
.tickets-refresh-btn:disabled{
  width:auto;
  min-width:42px;
  padding:0 8px;
  cursor:not-allowed;
  opacity:.55;
  font-size:9px;
  font-weight:800;
}

/* Mobile: keep two ticket cards visible and scroll the list itself. */
@media (max-width:900px){
  .tickets-list-panel{max-height:none}
  .tickets-list{
    flex:none;
    max-height:220px;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-gutter:stable;
  }
  .ticket-list-item{min-height:98px}
  .ticket-detail-panel{scroll-margin-top:76px}
}

@media (max-width:680px){
  .ticket-modal{
    align-items:flex-end;
    padding:12px;
  }
  .ticket-modal-card{
    padding:20px;
    border-radius:14px;
  }
  .ticket-modal-actions{
    flex-direction:column-reverse;
  }
  .ticket-modal-secondary,
  .ticket-modal-danger{
    width:100%;
    min-height:42px;
  }
  .tickets-list{max-height:214px}
}


/* Tickets page: no floating legacy mobile notification/button */
@media (max-width:900px){
  #bottom-notification,
  .bottom-notification{
    display:none !important;
  }
}


/* Ticket filtering + local search */
.tickets-list-tools{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:12px 10px 11px;
  border-bottom:1px solid rgba(255,255,255,.055);
  background:rgba(5,5,10,.12);
}

.tickets-filter-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}

.tickets-filter-btn{
  min-width:0;
  min-height:31px;
  padding:0 7px;
  border:1px solid rgba(255,255,255,.07);
  border-radius:7px;
  background:rgba(255,255,255,.018);
  color:rgba(255,255,255,.45);
  cursor:pointer;
  font-family:var(--display);
  font-size:8px;
  font-weight:800;
  letter-spacing:.075em;
  transition:
    color .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.tickets-filter-btn span{
  display:inline-flex;
  min-width:17px;
  height:17px;
  align-items:center;
  justify-content:center;
  margin-left:3px;
  padding:0 4px;
  border-radius:999px;
  background:rgba(255,255,255,.045);
  color:rgba(255,255,255,.42);
  font-family:var(--body);
  font-size:8px;
  font-weight:700;
  letter-spacing:0;
}

.tickets-filter-btn:hover{
  border-color:rgba(188,102,255,.24);
  color:rgba(255,255,255,.78);
}

.tickets-filter-btn.active{
  border-color:rgba(188,91,255,.38);
  background:linear-gradient(110deg,rgba(255,122,26,.055),rgba(177,77,255,.075));
  color:#fff;
}

.tickets-filter-btn.active span{
  background:rgba(190,102,255,.13);
  color:#d8afff;
}

.tickets-search-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.tickets-search-icon{
  position:absolute;
  left:11px;
  z-index:1;
  color:rgba(255,255,255,.3);
  font-size:15px;
  line-height:1;
  pointer-events:none;
}

.tickets-search-input{
  width:100%;
  height:36px;
  padding:0 35px 0 33px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:8px;
  outline:none;
  background:rgba(255,255,255,.018);
  color:#fff;
  font-family:var(--body);
  font-size:10.5px;
  transition:
    border-color .18s ease,
    background .18s ease,
    box-shadow .18s ease;
}

.tickets-search-input::placeholder{
  color:rgba(255,255,255,.27);
}

.tickets-search-input:focus{
  border-color:rgba(185,88,255,.4);
  background:rgba(255,255,255,.025);
  box-shadow:0 0 0 3px rgba(177,77,255,.045);
}

.tickets-search-clear{
  position:absolute;
  right:7px;
  display:inline-flex;
  width:24px;
  height:24px;
  align-items:center;
  justify-content:center;
  padding:0;
  border:0;
  border-radius:6px;
  background:transparent;
  color:rgba(255,255,255,.38);
  cursor:pointer;
  font-size:16px;
  line-height:1;
}

.tickets-search-clear:hover{
  background:rgba(255,255,255,.045);
  color:#fff;
}

.tickets-no-results{
  margin:14px 12px;
  padding:18px 12px;
  border:1px dashed rgba(255,255,255,.08);
  border-radius:9px;
  text-align:center;
}

.tickets-no-results-title{
  color:rgba(255,255,255,.68);
  font-family:var(--display);
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
}

.tickets-no-results p{
  margin:5px 0 0;
  color:rgba(255,255,255,.32);
  font-size:9.5px;
  line-height:1.45;
}

@media (max-width:900px){
  .tickets-list-tools{
    padding-inline:10px;
  }

  .tickets-search-input{
    height:38px;
    font-size:11px;
  }
}

@media (max-width:420px){
  .tickets-filter-btn{
    padding-inline:4px;
    font-size:7.5px;
    letter-spacing:.045em;
  }

  .tickets-filter-btn span{
    min-width:16px;
    margin-left:2px;
  }
}
