/* LUXURY THEME TICKETS PAGES */

.tickets-container {
    margin-top: 40px;
    min-height: 80vh;
}

/* Tickets List (Index) */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket-card {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.ticket-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ticket-id {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
}

.ticket-subject {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.ticket-meta {
    display: flex;
    gap: 20px;
    font-size: 0.85rem;
    color: #888;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-secondary {
    background: #e9ecef;
    color: #6c757d;
}

.badge-info {
    background: #e3f2fd;
    color: #0d47a1;
}

/* Ticket Create Page */
.page-header-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.back-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    color: #666;
    transition: all 0.2s;
    text-decoration: none;
}

.back-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateX(-3px);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    width: 50px;
    height: 50px;
    background: rgba(26, 26, 26, 0.1);
    /* fallback if var(--primary-rgb) not set, but using rgba with hex works in modern css or if calc used. Assuming we just use opacity on color */
    background: #f0f0f0;
    /* Fallback */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
}

.header-content h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.header-content p {
    margin: 0;
    color: #888;
    font-size: 0.9rem;
}

.ticket-form-wrapper {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.form-step {
    padding: 30px;
    border-bottom: 1px solid #f0f0f0;
}

.form-step:last-of-type {
    border-bottom: none;
}

.step-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.step-number {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.step-info h5 {
    margin: 0;
    font-weight: 600;
    color: var(--text-color);
}

.step-info p {
    margin: 0;
    color: #888;
    font-size: 0.85rem;
}

/* Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.cat-card {
    cursor: pointer;
    height: 100%;
    display: block;
    margin-bottom: 0;
}

.cat-card input {
    display: none;
}

.cat-inner {
    padding: 20px 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
    transition: all 0.25s ease;
    background: #fafafa;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cat-inner:hover {
    border-color: #ddd;
    transform: translateY(-3px);
    background: #fff;
}

.cat-card input:checked+.cat-inner {
    border-color: var(--primary);
    background: #fcfcfc;
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.cat-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: #fff;
    box-shadow: var(--shadow-sm);
    color: var(--primary);
}

.cat-inner h6 {
    margin: 0 0 5px 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.cat-inner p {
    margin: 0;
    color: #888;
    font-size: 0.75rem;
    line-height: 1.3;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.form-label i {
    color: var(--primary);
}

.form-control {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.2s;
    width: 100%;
    font-family: var(--font-body);
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

/* Priority Cards */
.priority-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.p-card {
    cursor: pointer;
    display: block;
    margin-bottom: 0;
}

.p-card input {
    display: none;
}

.p-inner {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.p-card input:checked+.p-inner {
    border-color: var(--primary);
    background: #fcfcfc;
}

.p-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: #f8f9fa;
    color: #555;
}

.p-content h6 {
    margin: 0 0 2px 0;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.p-content p {
    margin: 0;
    color: #888;
    font-size: 0.8rem;
}

.p-check {
    position: absolute;
    top: 10px;
    right: 10px;
    color: var(--primary);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s;
}

.p-card input:checked+.p-inner .p-check {
    opacity: 1;
    transform: scale(1);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #fafafa;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: #fcfcfc;
}

.upload-icon {
    font-size: 2rem;
    color: #ccc;
    margin-bottom: 15px;
}

.upload-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.remove-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.footer-info {
    color: #888;
    font-size: 0.9rem;
}

.footer-actions {
    display: flex;
    gap: 10px;
}

/* Ticket Details */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-bubble {
    max-width: 85%;
    padding: 15px 20px;
    border-radius: 8px;
    position: relative;
}

.message-bubble.customer {
    background: var(--primary);
    color: #fff;
    align-self: flex-end;
}

.message-bubble.admin {
    background: #f8f9fa;
    color: #333;
    align-self: flex-start;
    border: 1px solid #eee;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.sender {
    font-weight: 600;
}

.message-body {
    font-size: 0.95rem;
    line-height: 1.5;
}

.message-attachment {
    margin-top: 12px;
}

.attachment-preview {
    max-width: 200px;
    border-radius: 4px;
}

/* Reply Form */
.reply-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: var(--shadow-sm);
}

.reply-area {
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.reply-area textarea {
    border: none;
    background: transparent;
    width: 100%;
    resize: none;
    outline: none;
}

.reply-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 0;
}

.file-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.waiting-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 25px;
    box-shadow: var(--shadow-sm);
    margin-top: 20px;
}

.waiting-icon {
    width: 60px;
    height: 60px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    position: relative;
    flex-shrink: 0;
}

.waiting-content h5 {
    margin: 0 0 8px 0;
    font-weight: 600;
}

.waiting-content p {
    margin: 0;
    color: #666;
}

@media (max-width: 992px) {
    .category-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .category-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .priority-cards {
        grid-template-columns: 1fr;
    }

    .form-footer {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}