/* Modern Support & Ticket Page Styling */

.support-container {
    padding: 24px 36px;
    direction: rtl;
    font-family: 'IRANYekanX', 'Kalame', sans-serif;
    color: #e2e8f0;
}

/* Support Hero / Header */
.support-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.support-header-info h2 {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-header-info h2 i {
    color: #6366f1;
}

.support-header-info p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
    font-weight: 400;
}

.btn-create-ticket {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
}

.btn-create-ticket:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.45);
}

/* Feature Info Cards Grid */
.support-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.support-feature-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s ease;
}

.support-feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-2px);
}

.support-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #818cf8;
    flex-shrink: 0;
}

.support-feature-card:nth-child(2) .support-feature-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

.support-feature-card:nth-child(3) .support-feature-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.support-feature-text h4 {
    font-size: 13.5px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 3px 0;
}

.support-feature-text p {
    font-size: 11.5px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

/* Notice Guidelines Banner */
.support-notice-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 4px solid #6366f1;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 28px;
}

.support-notice-card h3 {
    font-size: 14px;
    font-weight: 700;
    color: #818cf8;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-notice-card ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.support-notice-card li {
    font-size: 12.5px;
    color: #cbd5e1;
    line-height: 1.6;
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-notice-card li::before {
    content: "•";
    color: #6366f1;
    font-weight: bold;
    font-size: 14px;
}

/* Table & Tickets List */
.support-table-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
}

.support-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.support-table th {
    background: rgba(255, 255, 255, 0.04);
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.support-table td {
    padding: 14px 20px;
    font-size: 13.5px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.support-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.ticket-title-link {
    color: #f8fafc !important;
    font-weight: 600;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.ticket-title-link:hover {
    color: #818cf8 !important;
}

.ticket-title-link.has-unread {
    color: #818cf8 !important;
    font-weight: 700;
}

.ticket-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}

.ticket-badge.read {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.ticket-badge.unread {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.ticket-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1 !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.ticket-action-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.4);
    color: #ffffff !important;
}

/* Empty Tickets State */
.support-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px border-dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.support-empty-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #6366f1;
    margin-bottom: 16px;
}

.support-empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 6px 0;
}

.support-empty-state p {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 20px 0;
}

/* Send Ticket Form Page */
.send-ticket-form-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 30px;
    max-width: 720px;
    margin: 0 auto;
}

.send-ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.send-ticket-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
}

.btn-back-messages {
    color: #94a3b8 !important;
    font-size: 12.5px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.btn-back-messages:hover {
    color: #ffffff !important;
}

.form-group-ticket {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group-ticket label {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
}

.ticket-input-text {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.2s ease;
}

.ticket-input-text:focus {
    border-color: #6366f1;
    background: rgba(255, 255, 255, 0.08);
}

.ticket-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.btn-submit-ticket {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.3);
}

.btn-submit-ticket:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.45);
}

/* ==========================================================================
   Chat Thread & Message Bubbles Redesign (Overrides legacy .chatstyle-01)
   ========================================================================== */

#message-thread {
    direction: rtl !important;
    width: 100% !important;
}

.chatstyle-01 {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    direction: rtl !important;
}

/* Common message container resets */
.chatstyle-01 .ca-received,
.chatstyle-01 .ca-send {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    margin-bottom: 8px !important;
    width: 100% !important;
    direction: rtl !important;
    float: none !important;
}

/* User Avatars */
.chatstyle-01 .user-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3) !important;
}

.chatstyle-01 .user-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
}

/* --------------------------------------------------------------------------
   Received Messages (Support Staff / Other User) - Left aligned in LTR, Right in RTL
   -------------------------------------------------------------------------- */
.chatstyle-01 .ca-received {
    flex-direction: row !important;
    justify-content: flex-start !important;
}

.chatstyle-01 .ca-received__msg-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    max-width: 80% !important;
    direction: rtl !important;
    width: auto !important;
}

.chatstyle-01 .ca-received__msgwrapper {
    display: flex !important;
    justify-content: flex-start !important;
    width: 100% !important;
    margin: 0 !important;
}

.chatstyle-01 .ca-received__msg {
    background: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 18px 18px 18px 4px !important;
    padding: 14px 20px !important;
    min-width: auto !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
    text-align: right !important;
    direction: rtl !important;
    width: 100% !important;
}

.chatstyle-01 .ca-received__msg h3 {
    margin: 0 0 6px 0 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
}

.chatstyle-01 .ca-received__msg h3 a {
    color: #818cf8 !important;
    text-decoration: none !important;
}

.chatstyle-01 .ca-received__msg p {
    color: #f1f5f9 !important;
    font-size: 13.5px !important;
    line-height: 1.7 !important;
    margin: 0 !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

/* --------------------------------------------------------------------------
   Sent Messages (Current User) - Left side (in RTL layout)
   -------------------------------------------------------------------------- */
.chatstyle-01 .ca-send {
    flex-direction: row-reverse !important;
    justify-content: flex-start !important;
}

.chatstyle-01 .ca-send__msg-group {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    max-width: 80% !important;
    direction: rtl !important;
    width: auto !important;
}

.chatstyle-01 .ca-send__msgwrapper {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    margin: 0 !important;
}

.chatstyle-01 .ca-send__msg {
    background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 18px 18px 4px 18px !important;
    padding: 14px 20px !important;
    min-width: auto !important;
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35) !important;
    text-align: right !important;
    direction: rtl !important;
    width: 100% !important;
}

.chatstyle-01 .ca-send__msg h3 {
    margin: 0 0 6px 0 !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
}

.chatstyle-01 .ca-send__msg h3 a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.chatstyle-01 .ca-send__msg p {
    color: #ffffff !important;
    font-size: 13.5px !important;
    line-height: 1.7 !important;
    margin: 0 !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
}

/* Metadata & Timestamp */
.chatstyle-01 .metadata {
    margin-top: 6px !important;
    padding: 0 4px !important;
}

.chatstyle-01 .metadata .time {
    font-size: 11px !important;
    color: #94a3b8 !important;
    font-weight: 400 !important;
    direction: ltr !important;
    display: inline-block !important;
}
