@import url('tsh-notifications-frontend.css');
@import url('tsh-flyouts.css');

.tsh-frontend-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}
.tsh-frontend-header h3 {
    margin: 0;
    color: #fff;
    display: inline-block;
}
.tsh-frontend-header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    margin-top: 10px;
    margin-bottom: 20px;
}
#tsh-history-container {
    max-height: 550px;
    overflow-y: auto;
    background: #121212;
    padding: 25px;
    border: 1px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 25px;
}
.tsh-msg {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 12px;
    position: relative;
    line-height: 1.6;
    font-size: 14px;
    color: #ffffff !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.tsh-msg-left {
    align-self: flex-start;
    background: #1a2a3a !important;
    border: 1px solid #2c4a6a;
    border-left: 5px solid #007cba;
}
.tsh-msg-right {
    align-self: flex-end;
    background: #1e281a !important;
    border: 1px solid #34442d;
    border-right: 5px solid #4caf50;
}
.tsh-msg-system {
    align-self: center;
    background: #252525 !important;
    color: #888 !important;
    padding: 6px 16px;
    font-size: 12px;
    border-radius: 20px;
    border: 1px solid #333;
}
.tsh-msg-meta {
    display: block;
    font-size: 11px;
    margin-bottom: 6px;
    color: #3a3a3a;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
}
.tsh-timestamp {
    font-weight: normal;
    margin-left: 10px;
    color: #666 !important;
}
.tsh-frontend-reply-box {
    padding: 25px;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
}
#tsh-reply-content {
    background: #000000 !important;
    color: #ffffff !important;
    border: 1px solid #444 !important;
    padding: 15px;
    width: 100%;
    border-radius: 6px;
}
.tsh-frontend-reply-box-closed {
    opacity: 0.45;
    filter: grayscale(100%);
    pointer-events: none;
}
.tsh-frontend-reply-box-closed textarea {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #777 !important;
    cursor: not-allowed !important;
    line-height: 1.4;
    padding-bottom: 12px;
    padding-top: 12px;
    resize: none;
    text-align: center;
}
.tsh-frontend-reply-box-closed button {
    background: #444 !important;
    border-color: #555 !important;
    color: #888 !important;
    cursor: not-allowed !important;
}
.tsh-closed-reply-display {
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 6px;
    color: #ccc;
    padding: 0 12px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0.65;
    filter: grayscale(100%);
    cursor: not-allowed;
    user-select: none;
}
#tsh-overlay-order-btn{
    margin-bottom:25px;
}
.tsh-overlay-box h2 {
    font-size: 22px;
    margin-bottom: 25px;
}
.tsh-overlay-box .tsh-btn-submit {
    width: 100%;
    margin-bottom: 18px;
    padding: 14px 0;
    font-size: 15px;
}
.tsh-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    margin-bottom: 10px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
    transition: all 0.2s ease;
}
.tsh-back-btn:hover {
    background-color: #e2e2e2;
    border-color: #bfbfbf;
}
.tsh-back-btn:active {
    background-color: #d6d6d6;
}

.woocommerce-MyAccount-navigation-link--tickets a:before {
    content: "\f486";
    font-family: "dashicons" !important;
    margin-right: 6px !important;
    font-size: 16px;
    vertical-align: middle;
}

.woocommerce-MyAccount-navigation-link--notifications a:before {
    content: "\f16d";
    font-family: "dashicons" !important;
    margin-right: 6px !important;
    font-size: 16px;
    vertical-align: middle;
}

.tsh-attached-box,
.tsh-orders-box {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 25px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.tsh-attached-box h3,
.tsh-orders-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.tsh-attached-ticket {
    margin-bottom: 18px;
    padding: 15px;
    background: #121212;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
}

.tsh-attached-toggle {
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 10px;
}

.tsh-attached-banner {
    background: #2a2a2a;
    padding: 12px;
    border-left: 4px solid #2271b1;
    border-radius: 4px;
    margin-bottom: 12px;
    color: #ddd;
    font-size: 14px;
}

.tsh-main-ticket-box {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
}

.tsh-ticket-table {
    table-layout: fixed;
    width: 100%;
}

.tsh-ticket-table th:first-child,
.tsh-ticket-table td:first-child {
    width: 90px !important;
    max-width: 90px !important;
    white-space: nowrap;
}

.tsh-ticket-table th:nth-child(3),
.tsh-ticket-table td:nth-child(3) {
    width: 110px !important;
}

.tsh-ticket-table th:nth-child(4),
.tsh-ticket-table td:nth-child(4) {
    width: 150px !important;
}

.tsh-ticket-table th:nth-child(5),
.tsh-ticket-table td:nth-child(5) {
    width: 90px !important;
}

.tsh-ticket-child {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
}

.tsh-ticket-child a.button.view {
    display: none;
}

.tsh-ticket-child td:first-child {
    position: relative;
    padding-left: 32px !important;
}

.tsh-ticket-child td:first-child:before {
    content: "➜";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 600;
    opacity: 0.9;
}

@media (max-width: 900px) {
    .tsh-ticket-child td:first-child {
        padding-left: 24px !important;
    }

    .tsh-ticket-child td:first-child:before {
        left: 6px;
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .tsh-ticket-child td:first-child {
        padding-left: 20px !important;
    }

    .tsh-ticket-child td:first-child:before {
        left: 4px;
        font-size: 14px;
    }
}

.tsh-ticket-table td:nth-child(2) {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
}

.tsh-msg-system,
.tsh-msg.system,
.tsh-system,
.tsh-reply.system {
    background: #f5f5f5 !important;
    color: #333 !important;
    border: 1px solid #ddd !important;
    padding: 5px 18px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}

.tsh-status-tabs {
    display: flex;
    gap: 8px;
    margin: 16px 0 20px 0;
    flex-wrap: wrap;
}

.tsh-status-tab {
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tsh-tab-total {
    opacity: 0.7;
    font-weight: 500;
}

.tsh-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #e53e3e;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.tsh-badge-new-ticket {
    display: inline-block;
    background: #e53e3e;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.tsh-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 16px 0 30px 0;
    flex-wrap: wrap;
}

.tsh-page-btn {
    background: #1e1e1e;
    color: #ccc;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-width: 36px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tsh-page-btn:hover:not(:disabled) {
    background: #262626;
    border-color: #444;
}

.tsh-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.tsh-page-btn.tsh-page-active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.tsh-tabstyle-pill .tsh-status-tab,
.tsh-tabstyle-rounded .tsh-status-tab,
.tsh-tabstyle-square .tsh-status-tab {
    background: #1e1e1e;
    color: #ccc;
    border: 1px solid #333;
    padding: 8px 16px;
}

.tsh-tabstyle-pill .tsh-status-tab:hover,
.tsh-tabstyle-rounded .tsh-status-tab:hover,
.tsh-tabstyle-square .tsh-status-tab:hover {
    background: #262626;
    border-color: #444;
}

.tsh-tabstyle-pill .tsh-status-tab.tsh-status-tab-active,
.tsh-tabstyle-rounded .tsh-status-tab.tsh-status-tab-active,
.tsh-tabstyle-square .tsh-status-tab.tsh-status-tab-active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.tsh-tabstyle-pill .tsh-status-tab {
    border-radius: 9999px;
}

.tsh-tabstyle-rounded .tsh-status-tab {
    border-radius: 8px;
}

.tsh-tabstyle-square .tsh-status-tab {
    border-radius: 2px;
}

.tsh-tabcolor-status .tsh-status-tab[data-status="open"].tsh-status-tab-active {
    background: #00a32a;
    border-color: #00a32a;
}

.tsh-tabcolor-status .tsh-status-tab[data-status="pending"].tsh-status-tab-active {
    background: #ffb900;
    border-color: #ffb900;
    color: #1e1e1e;
}

.tsh-tabcolor-status .tsh-status-tab[data-status="closed"].tsh-status-tab-active {
    background: #d63638;
    border-color: #d63638;
}

.tsh-tabcolor-custom .tsh-status-tab.tsh-status-tab-active {
    background: var(--tsh-accent-color, #2271b1);
    border-color: var(--tsh-accent-color, #2271b1);
}

.tsh-tabcolor-custom .tsh-status-tab:hover {
    border-color: var(--tsh-accent-color, #2271b1);
}

.tsh-status-badge-default {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.4px;
}

.tsh-status-tabs.tsh-align-left {
    justify-content: flex-start;
}

.tsh-status-tabs.tsh-align-center {
    justify-content: center;
}

.tsh-status-tabs.tsh-align-right {
    justify-content: flex-end;
}

.tsh-nav-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: var(--tsh-badge-color, #e53e3e) !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 0 5px !important;
    margin-left: 6px !important;
    vertical-align: middle !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    border-radius: 9999px !important;
}

body.tsh-badge-style-rounded .tsh-nav-badge {
    border-radius: 6px !important;
}

body.tsh-badge-style-square .tsh-nav-badge {
    border-radius: 2px !important;
}

body.tsh-badge-style-minimal .tsh-nav-badge {
    background: none !important;
    color: var(--tsh-badge-color, #e53e3e) !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-width: 0 !important;
    height: auto !important;
    margin-left: 4px !important;
}