/*
|--------------------------------------------------------------------------
| Inherit Theme Font
|--------------------------------------------------------------------------
*/

.horam-support,
.horam-support *,

.horam-support-chat,
.horam-support-chat *,

.horam-support-sidebar,
.horam-support-sidebar * {

    font-family: inherit !important;
}

/*
|--------------------------------------------------------------------------
| Wrapper
|--------------------------------------------------------------------------
*/

.horam-support{
    display:flex;
    gap:0;
    height:700px;
    border:1px solid #e5e7eb;
    border-radius:18px;
    overflow:hidden;
    background:#fff;
    direction:rtl;
    text-align:right;
    max-width: 100%;
}

/*
|--------------------------------------------------------------------------
| Sidebar
|--------------------------------------------------------------------------
*/

.horam-support-sidebar{
    width:320px;
    min-width:320px;
    border-left:1px solid #eee;
    background:#fafafa;
    display:flex;
    flex-direction:column;
}

/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

.horam-support-header{
    padding:20px;
    border-bottom:1px solid #eee;
    background:#fff;
}

.horam-support-header h3{
    margin:0 !important;
    font-size:17px !important;
    font-weight:400;
    color:#111827;
}
.horam-support-welcome { font-size: 15px;
  color: #666; }
/*
|--------------------------------------------------------------------------
| Ticket List
|--------------------------------------------------------------------------
*/

#horam-ticket-list{
    flex:1;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
}

/*
|--------------------------------------------------------------------------
| New Ticket Button
|--------------------------------------------------------------------------
*/

#horam-new-ticket-btn{
    margin:15px;
    border:none;
    background:#2563eb;
    color:#fff;
    height:46px;
    border-radius:12px;
    cursor:pointer;
    font-size:14px;
    font-weight:600;
    transition:.2s;
}

#horam-new-ticket-btn:hover{
    background:#1d4ed8;
}

/*
|--------------------------------------------------------------------------
| Chat Area
|--------------------------------------------------------------------------
*/

.horam-support-chat{
    flex:1;
    display:flex;
    flex-direction:column;
    background:#fff;
    min-width:0;
}

/*
|--------------------------------------------------------------------------
| Chat Box
|--------------------------------------------------------------------------
*/

#horam-chat-box{
    flex:1;
    overflow-y:auto;
    padding:24px;
    display:flex;
    flex-direction:column;
}

/*
|--------------------------------------------------------------------------
| Empty State
|--------------------------------------------------------------------------
*/

.horam-support-empty{
    display:flex;
    align-items:center;
    justify-content:center;
    height:100%;
    color:#888;
    font-size:15px;
}

/*
|--------------------------------------------------------------------------
| Modal
|--------------------------------------------------------------------------
*/

#horam-ticket-modal{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    z-index:9999;
    display:flex;
    align-items:center;
    justify-content:center;
    backdrop-filter:blur(3px);
    max-width: 100%;
}

/*
|--------------------------------------------------------------------------
| Modal Content
|--------------------------------------------------------------------------
*/

.horam-support-modal-content{
    width:550px;
    background:#fff;
    padding:25px;
    border-radius:18px;
    box-shadow:0 10px 40px rgba(0,0,0,.12);
}

.horam-support-modal-content h3{
    margin:0 !important;
    font-size:18px !important;
    color: #333 !important;
  font-weight: 600 !important;
}

/*
|--------------------------------------------------------------------------
| Inputs
|--------------------------------------------------------------------------
*/

.horam-support-modal-content option { font-family: Tahoma; }
.horam-support-modal-content input,
.horam-support-modal-content select,
.horam-support-modal-content textarea {
    width:100%;
    margin-top:15px;
    padding:14px;
    border:1px solid #ddd;
    border-radius:12px;
    box-sizing:border-box;
    font-family: inherit;
    font-size:14px;
    transition:.2s;
}

.horam-support-modal-content input:focus,
.horam-support-modal-content select:focus,
.horam-support-modal-content textarea:focus,
#horam-reply-message:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:
        0 0 0 4px rgba(37,99,235,.08);
}

.horam-support-modal-content textarea{
    height:120px;
    resize:none;
}

/*
|--------------------------------------------------------------------------
| Submit Button
|--------------------------------------------------------------------------
*/

#horam-create-ticket{
    width:100%;
    height:48px;
    border:none;
    background:#111827;
    color:#fff;
    border-radius:12px;
    margin-top:15px;
    cursor:pointer;
    font-family: inherit;
    font-size:14px;
    transition:.2s;
}

#horam-create-ticket:hover{
    background:#000;
}

/*
|--------------------------------------------------------------------------
| Ticket Item
|--------------------------------------------------------------------------
*/

.horam-support-ticket-item{
    padding:16px;
    border-bottom:1px solid #eee;
    cursor:pointer;
    display:flex;
    flex-direction:column;
    gap:10px;
    transition:.2s;
    background:#fafafa;
}

.horam-support-ticket-item:hover{
    background:#f3f4f6;
}

/*
|--------------------------------------------------------------------------
| Ticket Top
|--------------------------------------------------------------------------
*/

.horam-support-ticket-top{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.horam-support-ticket-top strong{
    font-size:14px;
    color:#111827;
    line-height:1.8;
}

/*
|--------------------------------------------------------------------------
| Ticket Status
|--------------------------------------------------------------------------
*/

.horam-ticket-status{
    padding:6px 12px;
    border-radius:50px;
    font-size:11px;
    font-weight:500;
    white-space:nowrap;
}

.horam-status-open{
    background:#dbeafe;
    color:#1d4ed8;
}

.horam-status-pending{
    background:#fef3c7;
    color:#b45309;
}

.horam-status-answered{
    background:#dcfce7;
    color:#15803d;
}

.horam-status-closed{
    background:#fee2e2;
    color:#b91c1c;
}

/*
|--------------------------------------------------------------------------
| Active Ticket
|--------------------------------------------------------------------------
*/

.horam-support-ticket-item.active{
    background:#eff6ff;
    border-right:4px solid #2563eb;
}

/*
|--------------------------------------------------------------------------
| Chat Header
|--------------------------------------------------------------------------
*/

.horam-support-chat-header{
    padding-bottom:5px;
    border-bottom:1px solid #eee;
    margin-bottom:5px;
}

.horam-support-chat-header h3{
    font-weight:400;
    color:#111827;
	padding: 0;
	margin: 5px 0 !important;
	font-size: 18px !important;
}

/*
|--------------------------------------------------------------------------
| Messages Wrapper
|--------------------------------------------------------------------------
*/

.horam-support-messages{
    display:flex;
    flex-direction:column;
    gap:16px;
    width:100%;
}

/*
|--------------------------------------------------------------------------
| Message Row
|--------------------------------------------------------------------------
*/

.horam-support-message{
    display:flex;
    width:100%;
}

/*
|--------------------------------------------------------------------------
| User Message
|--------------------------------------------------------------------------
*/

.horam-support-message.is-user{
    justify-content:flex-start;
}

/*
|--------------------------------------------------------------------------
| Admin Message
|--------------------------------------------------------------------------
*/

.horam-support-message.is-admin{
    justify-content:flex-end;
}

/*
|--------------------------------------------------------------------------
| Message Bubble
|--------------------------------------------------------------------------
*/

.horam-support-message-bubble{
    max-width:75%;
    padding:14px 18px;
    border-radius:18px;
    line-height:2;
    font-size:14px;
    word-break:break-word;
}

/*
|--------------------------------------------------------------------------
| User Bubble
|--------------------------------------------------------------------------
*/

.horam-support-message.is-user
.horam-support-message-bubble{

    background:#2563eb;
    color:#fff;
    border-bottom-right-radius:6px;
}

/*
|--------------------------------------------------------------------------
| Admin Bubble
|--------------------------------------------------------------------------
*/


.horam-support-message.is-admin
.horam-support-message-bubble{

    background:#f3f4f6;
    color:#111827;
    border-bottom-left-radius:6px;
}

/*
|--------------------------------------------------------------------------
| Reply Box
|--------------------------------------------------------------------------
*/

.horam-support-reply-box{
    margin-top:24px;
    padding-top:20px;
    border-top:1px solid #eee;
    display:flex;
    flex-direction:column;
    gap:12px;
}

/*
|--------------------------------------------------------------------------
| Reply Textarea
|--------------------------------------------------------------------------
*/

#horam-reply-message{
    width:100%;
    height: 60px;
    resize:none;
    border:1px solid #ddd;
    border-radius:14px;
    padding:14px;
    box-sizing:border-box;
    
    font-size:14px;
    transition:.2s;
}

/*
|--------------------------------------------------------------------------
| Reply Button
|--------------------------------------------------------------------------
*/

#horam-send-reply{
    width:180px;
    height:46px;
    border:none;
    border-radius:12px;
    background:#111827;
    color:#fff;
    cursor:pointer;
    
    font-size:14px;
    transition:.2s;
}

#horam-send-reply:hover{
    background:#000;
}

#horam-send-reply:disabled{
    opacity:.7;
    cursor:not-allowed;
}

/*
|--------------------------------------------------------------------------
| Scrollbar
|--------------------------------------------------------------------------
*/

#horam-ticket-list::-webkit-scrollbar,
#horam-chat-box::-webkit-scrollbar{
    width:6px;
}

#horam-ticket-list::-webkit-scrollbar-thumb,
#horam-chat-box::-webkit-scrollbar-thumb{
    background:#d1d5db;
    border-radius:20px;
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media(max-width:768px){

    .horam-support{
        flex-direction:column;
        height:auto;
    }

    .horam-support-sidebar{
        width:100%;
        min-width:100%;
        border-left:none;
        border-bottom:1px solid #eee;
    }

    .horam-support-chat{
        min-height:500px;
    }

    .horam-support-message-bubble{
        max-width:90%;
    }

    .horam-support-modal-content{
        width:95%;
    }

    .horam-support-ticket-top{
        flex-direction:column;
        align-items:flex-start;
    }

    #horam-send-reply{
        width:100%;
    }
}
/*
|--------------------------------------------------------------------------
| Reply Actions
|--------------------------------------------------------------------------
*/

.horam-support-reply-actions{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:12px;
}

/*
|--------------------------------------------------------------------------
| Upload Button
|--------------------------------------------------------------------------
*/

.horam-upload-btn{
    height:46px;
    padding:0 18px;
    border-radius:12px;
    background:#eef2ff;
    color:#4338ca;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:13px;
    font-weight:500;
    transition:.2s;
    user-select:none;
    border:1px solid #c7d2fe;
}

.horam-upload-btn:hover{
    background:#dbeafe;
    transform:translateY(-1px);
}

/*
|--------------------------------------------------------------------------
| Ticket Attachment (Create Ticket Modal)
|--------------------------------------------------------------------------
*/

.horam-ticket-attachment-label{
    display:flex;
    align-items:center;
    gap:8px;
    height:46px;
    padding:0 16px;
    border-radius:12px;
    background:#eef2ff;
    color:#4338ca;
    border:1px solid #c7d2fe;
    cursor:pointer;
    font-size:13px;
    font-weight:500;
    margin-bottom:6px;
    transition:.2s;
}

.horam-ticket-attachment-label:hover{
    background:#dbeafe;
}

/*
|--------------------------------------------------------------------------
| Image Message
|--------------------------------------------------------------------------
*/

.horam-support-image-wrap{
    max-width:260px;
}

.horam-support-image{
    width:100%;
    display:block;
    border-radius:16px;
    cursor:pointer;
    box-shadow:0 6px 24px rgba(0,0,0,.08);
    transition:.2s;
}

.horam-support-image:hover{
    transform:scale(1.02);
}

/*
|--------------------------------------------------------------------------
| File Card (non-image attachment in chat)
|--------------------------------------------------------------------------
*/

.horam-support-file-card{
    display:flex;
    align-items:center;
    gap:10px;
    max-width:260px;
    padding:10px 14px;
    border-radius:14px;
    background:#f3f4f6;
    border:1px solid #e5e7eb;
    text-decoration:none;
    transition:.2s;
}

.horam-support-file-card:hover{
    background:#e5e7eb;
}

.horam-support-file-icon{
    flex-shrink:0;
    width:38px;
    height:38px;
    border-radius:10px;
    background:#4338ca;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:10px;
    font-weight:700;
}

.horam-support-file-name{
    flex:1;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size:13px;
    color:#111827;
    direction:ltr;
    text-align:left;
}

.horam-support-file-download{
    flex-shrink:0;
    font-size:14px;
    color:#4338ca;
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media(max-width:768px){

    .horam-support-reply-actions{
        flex-direction:column;
        align-items:stretch;
    }

    .horam-upload-btn{
        width:100%;
    }
}
/*
|--------------------------------------------------------------------------
| Actions
|--------------------------------------------------------------------------
*/

.horam-support-actions{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:12px;
    flex-wrap:wrap;
}

/*
|--------------------------------------------------------------------------
| Upload Button
|--------------------------------------------------------------------------
*/

.horam-upload-btn{
    width:46px;
    height:46px;
    border-radius:12px;
    background:#f3f4f6;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    font-size:20px;
    transition:.2s;
    border:1px solid #e5e7eb;
}

.horam-upload-btn:hover{
    background:#e5e7eb;
}

/*
|--------------------------------------------------------------------------
| Voice Button
|--------------------------------------------------------------------------
*/

.horam-voice-btn{
    width:46px;
    height:46px;
    border:none;
    border-radius:12px;
    background:#111827;
    color:#fff;
    cursor:pointer;
    font-size:18px;
    transition:.2s;
}

.horam-voice-btn:hover{
    opacity:.92;
}

/*
|--------------------------------------------------------------------------
| Recording State
|--------------------------------------------------------------------------
*/

.horam-voice-btn.recording{
    background:#dc2626;
    animation:horamPulse 1s infinite;
}

/*
|--------------------------------------------------------------------------
| Pulse Animation
|--------------------------------------------------------------------------
*/

@keyframes horamPulse{

    0%{
        transform:scale(1);
    }

    50%{
        transform:scale(1.08);
    }

    100%{
        transform:scale(1);
    }
}

/*
|--------------------------------------------------------------------------
| Image Message
|--------------------------------------------------------------------------
*/

.horam-support-image{
    width:220px;
    max-width:100%;
    border-radius:14px;
    display:block;
    margin-top:5px;
}

/*
|--------------------------------------------------------------------------
| Voice Player
|--------------------------------------------------------------------------
*/

.horam-support-voice{
    width:260px;
    max-width:100%;
    display:block;
}

/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media(max-width:768px){

    .horam-support-actions{
        width:100%;
    }

    #horam-send-reply{
        flex:1;
    }

    .horam-support-voice{
        width:100%;
    }

    .horam-support-image{
        width:100%;
    }
}
/*
|--------------------------------------------------------------------------
| Admin Ticket Action Buttons
|--------------------------------------------------------------------------
*/

.horam-admin-ticket-actions {

    display:flex;

    gap:8px;

    flex-wrap:wrap;
}


/*
|--------------------------------------------------------------------------
| Reopen Ticket
|--------------------------------------------------------------------------
*/

.horam-reopen-ticket {

    background:#16a34a !important;

    border-color:#16a34a !important;

    color:#fff !important;

    transition:0.2s;
	border :none;
	padding: .2rem 1rem .4rem;border-radius: 1rem;
	position: absolute;
  left: 0;
	display: none;
}

.horam-reopen-ticket:hover {

    background:#15803d !important;

    border-color:#15803d !important;

    color:#fff !important;
}
/*

|--------------------------------------------------------------------------
| Close Ticket
|--------------------------------------------------------------------------
*/

.horam-close-ticket {

    background:#dc2626 !important;

    border-color:#dc2626 !important;

    color:#fff !important;

    transition:0.2s;
	border :none;
	padding: .2rem 1rem .4rem;
	border-radius: 1rem;
	position: absolute;
  left: 0;
}

.horam-close-ticket:hover {

    background:#b91c1c !important;

    border-color:#b91c1c !important;

    color:#fff !important;
}
/*
|--------------------------------------------------------------------------
| Chat Layout
|--------------------------------------------------------------------------
*/

#horam-chat-box {

    display: flex;

    flex-direction: column;

    height: 100%;

    min-height: 650px;

    overflow: hidden;
}

/*
|--------------------------------------------------------------------------
| Messages Area
|--------------------------------------------------------------------------
*/

.horam-support-messages {

    flex: 1;

    overflow-y: auto;

    padding: 20px;

    min-height: 0;
}

/*
|--------------------------------------------------------------------------
| Header
|--------------------------------------------------------------------------
*/

.horam-support-chat-header {

    flex-shrink: 0;

    padding: 0 20px 10px;

    border-bottom: 1px solid #eee;

    background: #fff;

    position: sticky;

    top: 0;

    z-index: 5;
}
/*
|--------------------------------------------------------------------------
| Ticket Actions
|--------------------------------------------------------------------------
*/

.horam-ticket-actions {

    flex-shrink: 0;

    padding: 12px 20px;

    background: #fff;

    border-top: 1px solid #eee;
	position: relative;
}

/*
|--------------------------------------------------------------------------
| Reply Box
|--------------------------------------------------------------------------
*/

.horam-support-reply-box {

    flex-shrink: 0;

    padding: 16px 20px;

    background: #fff;

    border-top: 1px solid #eee;

    position: sticky;

    bottom: 0;

    z-index: 10;
}
/*
|--------------------------------------------------------------------------
| Ticket Filters
|--------------------------------------------------------------------------
*/

.horam-ticket-filters {

    display: flex;

    gap: 10px;

    flex-wrap: wrap;

    margin: 20px 0;
}

.horam-ticket-filters .button {

    border-radius: 10px;

    padding: 6px 16px;

    transition: all .2s ease;
}

.horam-ticket-filters .button:hover {

    transform: translateY(-1px);
}

/*
|--------------------------------------------------------------------------
| Ticket Table
|--------------------------------------------------------------------------
*/

.widefat.striped tr td {

    vertical-align: middle;
}

/*
|--------------------------------------------------------------------------
| Status Badge
|--------------------------------------------------------------------------
*/

.horam-ticket-status-badge {

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 5px 10px;

    border-radius: 999px;

    font-size: 12px;

    font-weight: 500;
}

.horam-status-open {

    background: rgba(37,99,235,.12);

    color: #2563eb;
}

.horam-status-answered {

    background: rgba(22,163,74,.12);

    color: #16a34a;
}

.horam-status-waiting {

    background: rgba(22, 90, 163, 0.12);
  color: #2116a3;
}

.horam-status-pending {

    background: rgba(217,119,6,.12);

    color: #d97706;
}

.horam-status-closed {

    background: rgba(220,38,38,.12);

    color: #dc2626;
}

/*
|--------------------------------------------------------------------------
| Action Buttons
|--------------------------------------------------------------------------
*/

.horam-ticket-actions-admin {

    display: flex;

    gap: 8px;

    flex-wrap: wrap;
}

.horam-ticket-actions-admin .button {

    border-radius: 8px;
}

/*
|--------------------------------------------------------------------------
| Card Wrapper
|--------------------------------------------------------------------------
*/

.horam-admin-card {

    background: #fff;

    padding: 20px;

    border-radius: 14px;

    margin-top: 20px;

    box-shadow:
        0 2px 8px rgba(0,0,0,.04);
}

/*
|--------------------------------------------------------------------------
| Modern Glass Scrollbar
|--------------------------------------------------------------------------
*/

.horam-support-messages {

    scrollbar-width: thin;
    scrollbar-color:
        rgba(59,130,246,.7)
        rgba(255,255,255,.08);
}

/*
|--------------------------------------------------------------------------
| Chrome / Edge / Safari
|--------------------------------------------------------------------------
*/

.horam-support-messages::-webkit-scrollbar {

    width: 10px;
}

.horam-support-messages::-webkit-scrollbar-track {

    background:
        rgba(255,255,255,.06);

    backdrop-filter:
        blur(10px);

    border-radius: 30px;

    margin: 10px;
}

.horam-support-messages::-webkit-scrollbar-thumb {

    background:
        linear-gradient(
            180deg,
            rgba(59,130,246,.95),
            rgba(37,99,235,.95)
        );

    border-radius: 30px;

    border: 2px solid
        rgba(255,255,255,.15);

    box-shadow:
        0 0 10px
        rgba(59,130,246,.35);

    transition:
        .25s ease;
}

.horam-support-messages::-webkit-scrollbar-thumb:hover {

    background:
        linear-gradient(
            180deg,
            rgba(96,165,250,1),
            rgba(37,99,235,1)
        );

    box-shadow:
        0 0 16px
        rgba(59,130,246,.55);

    transform:
        scale(1.05);
}

/*
|--------------------------------------------------------------------------
| Smooth Scroll
|--------------------------------------------------------------------------
*/

.horam-support-messages {

    scroll-behavior: smooth;
}
/* 
|--------------------------------------------------------------------------
| Ticket List Scrollbar
|--------------------------------------------------------------------------
*/

#horam-ticket-list::-webkit-scrollbar {
    width: 6px;
}

#horam-ticket-list::-webkit-scrollbar-track {
    background: transparent;
}

#horam-ticket-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
    transition: 0.3s;
}

#horam-ticket-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox */

#horam-ticket-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

