/* *****************************************************
   HopeIDC Ticket System Styles
   Used by: viewticket.tpl, supportticketsubmit-steptwo.tpl
***************************************************** */

/* ========== Ticket Status Bar ========== */
.tk-status-bar {
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 24px;
    color: #fff;
}
.tk-status-bar.tk-status-info { background: linear-gradient(135deg, #2193ec, #1a73e8); }
.tk-status-bar.tk-status-success { background: linear-gradient(135deg, #27ae60, #1e8449); }
.tk-status-bar.tk-status-warning { background: linear-gradient(135deg, #f39c12, #d68910); }
.tk-status-bar.tk-status-secondary { background: linear-gradient(135deg, #6c757d, #545b62); }
.tk-status-bar.tk-status-dark { background: linear-gradient(135deg, #495057, #343a40); }
.tk-status-bar.tk-status-primary { background: linear-gradient(135deg, #1a73e8, #0d47a1); }
.tk-status-bar.tk-status-danger { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.tk-status-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.tk-status-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.tk-status-icon { font-size: 28px; opacity: 0.9; }
.tk-status-num { font-size: 20px; font-weight: 700; }
.tk-status-text { font-size: 13px; opacity: 0.9; }
.tk-status-right { display: flex; gap: 8px; }
.tk-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.2s;
}
.tk-action-btn:hover { background: rgba(255,255,255,0.35); color: #fff; text-decoration: none; }
.tk-action-close { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.tk-action-close:hover { background: rgba(220,53,69,0.5); }

/* ========== Cards ========== */
.tk-card {
    background: #fff;
    border: 1px solid #e5e8ec;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}
.tk-card-header {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #f0f2f5;
    background: #fafbfc;
}
.tk-card-body { padding: 20px; }
.tk-card-body.p-0 { padding: 0; }

/* ========== Ticket Info Grid ========== */
.tk-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: none;
}
.tk-info-item {
    padding: 16px 20px;
    border-right: 1px solid #f0f2f5;
    border-bottom: 1px solid #f0f2f5;
}
.tk-info-item:last-child { border-right: none; }
.tk-info-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}
.tk-info-value {
    display: block;
    font-size: 14px;
    color: #333;
    word-break: break-word;
}

/* ========== Replies ========== */
.tk-reply {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f2f5;
    border-left: 3px solid #e5e8ec;
}
.tk-reply:last-child { border-bottom: none; }
.tk-reply-staff {
    background: #f8fbff;
    border-left-color: #1a73e8;
}
.tk-reply-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.tk-reply-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.tk-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 15px;
    flex-shrink: 0;
}
.tk-avatar-staff {
    background: #dbeafe;
    color: #1a73e8;
}
.tk-reply-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
}
.tk-reply-date {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}
.tk-reply-body {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
    padding-left: 46px;
}
.tk-reply-body p { margin-bottom: 8px; }
.tk-reply-body p:last-child { margin-bottom: 0; }
.tk-reply-body pre {
    background: #f6f8fa;
    border: 1px solid #eaecef;
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
}

/* ========== Attachments ========== */
.tk-reply-attachments {
    padding-left: 46px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e9ecef;
}
.tk-attach-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
}
.tk-attach-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tk-attach-item {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    background: #f5f7fa;
    padding: 4px 10px;
    border-radius: 4px;
}
.tk-attach-item a { color: #1a73e8; text-decoration: none; }
.tk-attach-item a:hover { text-decoration: underline; }

/* ========== Reply Form ========== */
.tk-reply-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

/* ========== Ticket Submit Form ========== */
.tk-card .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}
.tk-card .form-control {
    border-radius: 6px;
    border-color: #dde1e6;
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tk-card .form-control:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}
.tk-card textarea.form-control {
    resize: vertical;
    min-height: 180px;
}

/* Upload zone */
.tk-upload-zone {
    border: 2px dashed #d0d5dd;
    border-radius: 8px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.tk-upload-zone:hover,
.tk-upload-zone.tk-upload-dragover {
    border-color: #1a73e8;
    background: #f0f6ff;
}
.tk-upload-icon {
    font-size: 36px;
    color: #98a2b3;
    margin-bottom: 8px;
    display: block;
}
.tk-upload-zone:hover .tk-upload-icon,
.tk-upload-zone.tk-upload-dragover .tk-upload-icon {
    color: #1a73e8;
}
.tk-upload-text {
    font-size: 14px;
    color: #667085;
}
.tk-upload-list { margin-top: 10px; }
.tk-upload-list .form-control {
    margin-top: 8px;
    border-radius: 6px;
}
.tk-upload-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Submit notice */
.tk-submit-notice {
    background: #fff8e6;
    border: 1px solid #ffd666;
    border-radius: 6px;
    padding: 12px 16px;
    font-size: 13px;
    color: #8a6d00;
    margin-bottom: 20px;
}
.tk-submit-notice i {
    color: #faad14;
    margin-right: 8px;
}

/* Submit actions */
.tk-submit-actions {
    display: flex;
    gap: 12px;
}
.tk-submit-btn {
    min-width: 160px;
}

/* ========== Responsive ========== */
@media (max-width: 991px) {
    .tk-info-grid { grid-template-columns: repeat(2, 1fr); }
    .tk-info-item:nth-child(2) { border-right: none; }
}
@media (max-width: 575px) {
    .tk-status-inner { flex-direction: column; align-items: flex-start; }
    .tk-info-grid { grid-template-columns: 1fr; }
    .tk-info-item { border-right: none; }
    .tk-reply { padding: 14px 16px; }
    .tk-reply-body, .tk-reply-attachments { padding-left: 0; margin-top: 10px; }
    .tk-reply-actions { flex-direction: column; }
    .tk-reply-actions .btn { width: 100%; }
    .tk-upload-zone { padding: 20px 12px; }
    .tk-upload-footer { flex-direction: column; align-items: flex-start; }
    .tk-submit-actions { flex-direction: column; }
    .tk-submit-actions .btn { width: 100%; }
}

/* ========== Print ========== */
@media print {
    .tk-status-bar { background: #f5f5f5 !important; color: #333 !important; -webkit-print-color-adjust: exact; }
    .tk-card { break-inside: avoid; }
    .tk-reply-staff { background: #f5f5f5 !important; }
}
