/* --- Complete Ticket System Styles --- */

/* ==============================================
   TICKET CARD STYLES (for TicketDisplay.razor)
   ============================================== */

.ticket-card {
    background: linear-gradient(120deg, #fff 0%, #f8fcff 100%);
    border-radius: 1.2rem;
    box-shadow: 0 4px 24px rgba(0,180,255,0.08);
    border: 1px solid rgba(0,180,255,0.12);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 1.2rem 1.2rem 0 0;
}

.ticket-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,180,255,0.15);
    border-color: rgba(0,180,255,0.25);
}

.ticket-icon-modern {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,180,255,0.25);
}

/* ==============================================
   TICKET BUTTON STYLES (shared across components)
   ============================================== */

.ticket-btn-modern {
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    padding: 0.6rem 1.2rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid transparent !important;
    text-decoration: none !important;
}

.ticket-btn-primary {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(0,180,255,0.3) !important;
}

.ticket-btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(0,180,255,0.4) !important;
    color: white !important;
}

.ticket-btn-success {
    background: #10b981 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}

.ticket-btn-success:hover {
    background: #059669 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4) !important;
    color: white !important;
}

.ticket-btn-danger {
    background: #ef4444 !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3) !important;
}

.ticket-btn-danger:hover {
    background: #dc2626 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4) !important;
    color: white !important;
}

/* ==============================================
   DIALOG STYLES (for TicketDialog.razor)
   ============================================== */

.message-container {
    height: calc(70vh - 120px);
    overflow-y: auto;
    padding: 1.5rem;
    background: #f8fafc;
    scroll-behavior: smooth;
}

.message-bubble-user {
    max-width: 70%;
    margin-left: auto;
    margin-bottom: 1.5rem;
    animation: messageSlideIn 0.3s ease-out;
}

.message-bubble-admin {
    max-width: 70%;
    margin-right: auto;
    margin-bottom: 1.5rem;
    animation: messageSlideIn 0.3s ease-out;
}

.message-content-user {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 1.2rem 1.2rem 0.3rem 1.2rem;
    padding: 1rem 1.2rem;
    box-shadow: 0 4px 16px rgba(0,180,255,0.2);
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-content-admin {
    background: white;
    color: var(--background-dark);
    border-radius: 1.2rem 1.2rem 1.2rem 0.3rem;
    padding: 1rem 1.2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

/* ==============================================
   INPUT STYLES (for TicketDialog.razor)
   ============================================== */

.ticket-input-modern {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    border: 1px solid #e5e7eb;
    border-radius: 1.2rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    resize: none;
    transition: all 0.2s;
    background: white;
}

.ticket-input-modern:focus {
    outline: none;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(0,180,255,0.1);
}

.ticket-send-btn-modern {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,180,255,0.3);
}

.ticket-send-btn-modern:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0,180,255,0.4) !important;
}

.ticket-send-btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ==============================================
   SHARED ANIMATIONS
   ============================================== */

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

@media (max-width: 768px) {
    .ticket-card {
        margin-bottom: 1rem;
        padding: 1.2rem;
    }
    
    .ticket-icon-modern {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .message-bubble-user,
    .message-bubble-admin {
        max-width: 85%;
    }
    
    .message-container {
        padding: 1rem;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .message-bubble-user,
    .message-bubble-admin {
        max-width: 95%;
    }
    
    .ticket-card {
        padding: 1rem;
    }
}

/* ==============================================
   UTILITY CLASSES
   ============================================== */

.ticket-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--primary-color);
}

.ticket-loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(0,180,255,0.2);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ticket-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.ticket-empty-icon {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.ticket-empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--background-dark);
    margin-bottom: 0.5rem;
}

.ticket-empty-description {
    font-size: 0.875rem;
    color: #6b7280;
}

/* ==============================================
   EXTRACTED INLINE STYLES
   ============================================== */

/* Ticket Header Styles */
.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.ticket-number {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(0,180,255,0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(0,180,255,0.2);
}

.ticket-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-status-open {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.ticket-status-closed {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.2);
}

/* Ticket Content Styles */
.ticket-content {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-details {
    flex: 1;
    min-width: 0;
}

.ticket-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ticket-field-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.ticket-field-value {
    font-size: 0.875rem;
    color: var(--background-dark);
    font-weight: 500;
    word-break: break-word;
}

/* Message Preview Styles */
.ticket-message-preview {
    background: rgba(0,180,255,0.05);
    border: 1px solid rgba(0,180,255,0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.ticket-message-header {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-message-content {
    font-size: 0.875rem;
    color: var(--background-dark);
    line-height: 1.5;
}

/* Footer Styles */
.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-date-value {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.ticket-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Dialog Styles */
.ticket-dialog-container {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    max-width: 900px;
    margin: 0 auto;
}

.ticket-dialog-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ticket-dialog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    margin-bottom: 0.25rem;
}

.ticket-dialog-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
}

.ticket-dialog-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    border-radius: 50%;
}

.ticket-dialog-input-area {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.ticket-dialog-input-container {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

/* Message Header Styles */
.message-header-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    justify-content: flex-end;
}

.message-header-admin {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.message-info-user {
    text-align: right;
}

.message-sender-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--background-dark);
}

.message-timestamp {
    font-size: 0.75rem;
    color: #6b7280;
}
