/* Enterprise Customer Portal CSS - Professional Modern Design */
/* Complete isolation from theme interference with maximum specificity */

/* CSS Reset and Isolation */
.wc-portal-isolation-wrapper {
    all: initial !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #0f172a !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    min-height: 100vh !important;
    position: relative !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.wc-portal-isolation-wrapper *,
.wc-portal-isolation-wrapper *::before,
.wc-portal-isolation-wrapper *::after {
    box-sizing: border-box !important;
    font-family: inherit !important;
}

/* Font Awesome icon support */
.wc-portal-isolation-wrapper .fa,
.wc-portal-isolation-wrapper [class^="fa-"],
.wc-portal-isolation-wrapper [class*=" fa-"] {
    display: inline-block !important;
    font-style: normal !important;
    line-height: 1 !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.wc-portal-isolation-wrapper .fas,
.wc-portal-isolation-wrapper .fa-solid {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
}

.wc-portal-isolation-wrapper .far,
.wc-portal-isolation-wrapper .fa-regular {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 400 !important;
}

.wc-portal-isolation-wrapper .fab,
.wc-portal-isolation-wrapper .fa-brands {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands", "FontAwesome" !important;
    font-weight: 400 !important;
}

/* Main Portal Container */
.wc-next-portal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    min-height: 100vh !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
    position: relative !important;
    -webkit-font-smoothing: antialiased !important;
    font-size: 16px !important;
    display: block !important;
    width: 100% !important;
}

/* Header - Modern Enterprise Style */
.wc-next-portal .wc-next-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    backdrop-filter: blur(8px) !important;
}

.wc-next-portal .wc-header-content {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 1.25rem 2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.wc-next-portal .wc-brand {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.wc-next-portal .wc-brand-mark {
    width: 48px !important;
    height: 48px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3) !important;
}

.wc-next-portal .wc-brand-mark i {
    font-size: 20px !important;
    color: white !important;
}

.wc-next-portal .wc-brand-text h1 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
}

.wc-next-portal .wc-brand-text p {
    font-size: 0.875rem !important;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    font-weight: 500 !important;
}

/* Hero Section - Professional Card Design */
.wc-next-portal .wc-ticket-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    margin: 2rem auto !important;
    max-width: 1400px !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
    margin-left: 2rem !important;
    margin-right: 2rem !important;
}

.wc-next-portal .wc-hero-content {
    padding: 2.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 2rem !important;
}

.wc-next-portal .wc-ticket-meta {
    display: flex !important;
    align-items: center !important;
    gap: 2.5rem !important;
    flex-wrap: wrap !important;
}

.wc-next-portal .wc-ticket-number-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
}

.wc-next-portal .wc-ticket-icon {
    width: 72px !important;
    height: 72px !important;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border-radius: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    font-size: 32px !important;
    color: #3b82f6 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.wc-next-portal .wc-ticket-icon i {
    color: #3b82f6 !important;
    font-size: 32px !important;
}

.wc-next-portal .wc-ticket-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
}

.wc-next-portal .wc-ticket-subtitle {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.875rem !important;
    margin-bottom: 0.25rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

.wc-next-portal .wc-ticket-subtitle i {
    font-size: 14px !important;
    color: #64748b !important;
}

.wc-next-portal .wc-ticket-number {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    color: #0f172a !important;
    line-height: 1.1 !important;
    letter-spacing: -0.025em !important;
}

.wc-next-portal .wc-ticket-number i {
    font-size: 1.75rem !important;
    color: #10b981 !important;
}

.wc-next-portal .wc-status-badges {
    display: flex !important;
    gap: 1rem !important;
    flex-wrap: wrap !important;
}

.wc-next-portal .wc-status-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 12px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    text-transform: capitalize !important;
    letter-spacing: 0.025em !important;
    border: 1px solid transparent !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease !important;
}

/* Enhanced Status Badge Colors */
.wc-next-portal .wc-status-badge.wc-status-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.wc-next-portal .wc-status-badge.wc-status-open {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: #ffffff !important;
    border-color: #3b82f6 !important;
}

.wc-next-portal .wc-status-badge.wc-status-in_progress {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #ffffff !important;
    border-color: #f59e0b !important;
}

.wc-next-portal .wc-status-badge.wc-status-pending,
.wc-next-portal .wc-status-badge.wc-status-pending_customer {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    color: #ffffff !important;
    border-color: #8b5cf6 !important;
}

.wc-next-portal .wc-status-badge.wc-status-on_hold {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

.wc-next-portal .wc-status-badge.wc-status-resolved {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.wc-next-portal .wc-status-badge.wc-status-closed {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: #ffffff !important;
    border-color: #64748b !important;
}

.wc-next-portal .wc-status-badge.wc-status-answered {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.wc-next-portal .wc-status-badge.wc-status-customer-reply {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #0f172a !important;
    border-color: #fbbf24 !important;
}

.wc-next-portal .wc-status-badge i {
    font-size: 16px !important;
    color: inherit !important;
}

.wc-next-portal .wc-status-badge span {
    color: inherit !important;
}

/* Main Content */
.wc-next-portal .wc-portal-content {
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 2rem 3rem !important;
}

/* Mobile Info Bar - Hidden on Desktop */
.wc-next-portal .wc-mobile-info-bar {
    display: none !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 1rem 1.25rem !important;
    margin-bottom: 1.5rem !important;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    white-space: nowrap !important;
    align-items: center !important;
    font-size: 0.875rem !important;
    gap: 0 !important;
}

.wc-next-portal .wc-mobile-info-bar::-webkit-scrollbar {
    display: none !important;
}

.wc-next-portal .wc-mobile-info-item {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    color: #0f172a !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}

.wc-next-portal .wc-mobile-info-emoji {
    font-size: 16px !important;
    line-height: 1 !important;
    margin-right: 0.25rem !important;
}

.wc-next-portal .wc-mobile-info-divider {
    color: #cbd5e1 !important;
    margin: 0 1rem !important;
    font-weight: 300 !important;
    font-size: 1rem !important;
}

/* Info Grid - Modern Card Layout - Force 4 columns on desktop */
.wc-next-portal .wc-portal-info-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1.5rem !important;
    margin-bottom: 3rem !important;
}

.wc-next-portal .wc-portal-info-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 2rem !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 1.25rem !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    margin: 0 !important;
    position: relative !important;
    overflow: hidden !important;
}

.wc-next-portal .wc-portal-info-card::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #10b981) !important;
}

.wc-next-portal .wc-portal-info-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    transform: translateY(-2px) !important;
}

.wc-next-portal .wc-portal-info-icon {
    width: 48px !important;
    height: 48px !important;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #3b82f6 !important;
    flex-shrink: 0 !important;
    font-size: 20px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.wc-next-portal .wc-portal-info-icon i {
    color: #3b82f6 !important;
    font-size: 20px !important;
}

.wc-next-portal .wc-portal-info-text h3 {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    margin: 0 0 0.5rem 0 !important;
    color: #64748b !important;
    line-height: 1.3 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

.wc-next-portal .wc-portal-info-text p {
    font-size: 1.125rem !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
}

.wc-next-portal .wc-portal-info-sub {
    display: block !important;
    font-size: 0.875rem !important;
    color: #64748b !important;
    margin-top: 0.25rem !important;
    font-weight: 500 !important;
}

/* Conversation Container */
.wc-next-portal .wc-conversation-container {
    max-width: 1000px !important;
    margin: 0 auto !important;
    width: 100% !important;
    padding: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
}

.wc-next-portal .wc-portal-section-title {
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin-bottom: 2rem !important;
    color: #0f172a !important;
    text-align: left !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
}

/* Chat Window - Modern Design */
.wc-next-portal .wc-portal-chat {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 20px !important;
    padding: 0 !important;
    min-height: 600px !important;
    max-height: 750px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    width: 100% !important;
    margin: 0 !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
}

.wc-next-portal .wc-chat-messages {
    flex: 1 !important;
    padding: 2rem !important;
    overflow-y: auto !important;
    background: linear-gradient(135deg, #fafbff 0%, #f1f5f9 100%) !important;
    margin: 0 !important;
    position: relative !important;
}

.wc-next-portal .wc-chat-input-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 2rem !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    position: relative !important;
    border-radius: 0 0 20px 20px !important;
}

/* Business Hours Notice - Modern Professional Design */
.wc-next-portal .wc-chat-business-hours {
    margin-top: 1.5rem !important;
    padding: 0 !important;
}

.wc-next-portal .wc-chat-hours-content {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1.25rem 1.5rem !important;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    border: 1px solid #93c5fd !important;
    border-radius: 12px !important;
    font-size: 0.875rem !important;
    color: #1e40af !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.wc-next-portal .wc-chat-hours-content::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8, #1e40af) !important;
}

.wc-next-portal .wc-chat-hours-content i {
    font-size: 20px !important;
    color: #3b82f6 !important;
    flex-shrink: 0 !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e2e8f0 !important;
}

.wc-next-portal .wc-chat-hours-text {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.375rem !important;
    flex: 1 !important;
}

.wc-next-portal .wc-hours-title {
    font-weight: 700 !important;
    color: #1e40af !important;
    font-size: 0.9375rem !important;
    margin: 0 !important;
    letter-spacing: -0.01em !important;
}

.wc-next-portal .wc-hours-time {
    font-weight: 600 !important;
    color: #3b82f6 !important;
    font-size: 1rem !important;
    margin: 0 !important;
    letter-spacing: -0.005em !important;
}

.wc-next-portal .wc-hours-note {
    font-size: 0.8125rem !important;
    color: #1e40af !important;
    font-style: normal !important;
    opacity: 0.85 !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

/* Message Styling */
.wc-next-portal .wc-portal-date-separator {
    text-align: center !important;
    margin: 2rem 0 !important;
    position: relative !important;
}

.wc-next-portal .wc-portal-date-separator::before {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    height: 1px !important;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent) !important;
}

.wc-next-portal .wc-portal-date-separator span {
    background: #fafbff !important;
    padding: 0 1.5rem !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
    position: relative !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}

.wc-next-portal .wc-portal-message {
    display: flex !important;
    gap: 1rem !important;
    margin-bottom: 1.5rem !important;
    align-items: flex-start !important;
}

.wc-next-portal .wc-portal-message.customer {
    flex-direction: row-reverse !important;
}

.wc-next-portal .wc-portal-message-avatar {
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.875rem !important;
    flex-shrink: 0 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3) !important;
}

.wc-next-portal .wc-portal-message.customer .wc-portal-message-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3) !important;
}

.wc-next-portal .wc-portal-message-content {
    flex: 1 !important;
    min-width: 0 !important;
    max-width: 75% !important;
}

.wc-next-portal .wc-portal-message.customer .wc-portal-message-content {
    text-align: right !important;
}

.wc-next-portal .wc-portal-message-header {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-bottom: 0.5rem !important;
}

.wc-next-portal .wc-portal-message.customer .wc-portal-message-header {
    justify-content: flex-end !important;
}

.wc-next-portal .wc-portal-message-author {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

.wc-next-portal .wc-portal-message-time {
    font-size: 0.75rem !important;
    color: #64748b !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

.wc-next-portal .wc-portal-message-bubble {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px 16px 16px 4px !important;
    padding: 1.25rem 1.5rem !important;
    position: relative !important;
    margin: 0 !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.wc-next-portal .wc-portal-message.customer .wc-portal-message-bubble {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    border: 1px solid #3b82f6 !important;
    color: white !important;
    border-radius: 16px 16px 4px 16px !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3) !important;
}

.wc-next-portal .wc-portal-message-text p {
    margin: 0 0 0.75rem 0 !important;
    line-height: 1.6 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
}

.wc-next-portal .wc-portal-message-text p:last-child {
    margin-bottom: 0 !important;
}

/* Attachments */
.wc-next-portal .wc-portal-attachments {
    margin-top: 1rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
}

.wc-next-portal .wc-portal-message.customer .wc-portal-attachments {
    border-top-color: rgba(255, 255, 255, 0.3) !important;
}

.wc-next-portal .wc-portal-attachment {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    color: #0f172a !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
}

.wc-next-portal .wc-portal-attachment:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.wc-next-portal .wc-portal-message.customer .wc-portal-attachment {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: white !important;
}

.wc-next-portal .wc-portal-message.customer .wc-portal-attachment:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

/* Image Attachment Thumbnails - Enhanced for all screen sizes */
.wc-next-portal .wc-portal-image-attachment {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    max-width: 120px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    padding: 0 !important;
}

.wc-next-portal .wc-portal-image-attachment:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.wc-next-portal .wc-portal-image-link {
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
}

.wc-next-portal .wc-portal-thumbnail {
    width: 100% !important;
    height: 80px !important;
    object-fit: cover !important;
    border: none !important;
    margin: 0 !important;
    display: block !important;
    border-radius: 8px 8px 0 0 !important;
}

.wc-next-portal .wc-portal-image-filename {
    padding: 0.5rem 0.375rem !important;
    font-size: 0.6875rem !important;
    color: #64748b !important;
    text-align: center !important;
    line-height: 1.2 !important;
    word-break: break-word !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    width: 100% !important;
    font-weight: 500 !important;
}

.wc-next-portal .wc-portal-message.customer .wc-portal-image-attachment {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.wc-next-portal .wc-portal-message.customer .wc-portal-image-filename {
    background: rgba(255, 255, 255, 0.15) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Chat Input Form */
.wc-next-portal .wc-portal-form-group {
    margin-bottom: 0 !important;
    display: flex !important;
    align-items: flex-end !important;
    gap: 1rem !important;
}

.wc-next-portal .wc-portal-textarea {
    width: 100% !important;
    min-height: 64px !important;
    padding: 1.25rem 1.5rem !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 12px !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    color: #0f172a !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    resize: none !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex: 1 !important;
    font-weight: 500 !important;
}

.wc-next-portal .wc-portal-textarea::placeholder {
    color: #94a3b8 !important;
    font-weight: 500 !important;
}

.wc-next-portal .wc-portal-textarea:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    background: #ffffff !important;
}

.wc-next-portal .wc-portal-form-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
    flex-wrap: nowrap !important;
}

.wc-next-portal .wc-portal-file-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1.25rem !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    color: #0f172a !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 0.875rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    height: 42px !important;
    font-weight: 600 !important;
}

.wc-next-portal .wc-portal-file-label:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border-color: #94a3b8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.wc-next-portal .wc-portal-file-label i {
    color: #3b82f6 !important;
    font-size: 16px !important;
}

.wc-next-portal .wc-portal-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.75rem 2rem !important;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    height: 42px !important;
    min-width: 120px !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3) !important;
}

.wc-next-portal .wc-portal-submit-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 12px -2px rgba(59, 130, 246, 0.4) !important;
}

.wc-next-portal .wc-portal-submit-btn:active {
    transform: translateY(0) !important;
}

.wc-next-portal .wc-portal-submit-btn i {
    color: white !important;
    font-size: 16px !important;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .wc-next-portal .wc-header-content {
        padding: 1rem !important;
    }
    
    .wc-next-portal .wc-ticket-hero {
        margin: 1rem !important;
        border-radius: 12px !important;
    }
    
    .wc-next-portal .wc-hero-content {
        padding: 1.5rem !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem !important;
    }
    
    .wc-next-portal .wc-ticket-meta {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem !important;
        width: 100% !important;
    }
    
    .wc-next-portal .wc-ticket-number-wrap {
        gap: 1rem !important;
    }
    
    .wc-next-portal .wc-ticket-icon {
        width: 56px !important;
        height: 56px !important;
        font-size: 24px !important;
    }
    
    .wc-next-portal .wc-ticket-number {
        font-size: 1.75rem !important;
    }
    
    .wc-next-portal .wc-portal-content {
        padding: 0 1rem 2rem !important;
    }
    
    /* Hide desktop info cards on mobile */
    .wc-next-portal .wc-portal-info-grid {
        display: none !important;
    }
    
    /* Show mobile info bar */
    .wc-next-portal .wc-mobile-info-bar {
        display: flex !important;
    }
    
    .wc-next-portal .wc-portal-chat {
        border-radius: 12px !important;
        min-height: 500px !important;
        max-height: 600px !important;
    }
    
    .wc-next-portal .wc-chat-messages {
        padding: 1.5rem 1rem !important;
    }
    
    .wc-next-portal .wc-chat-input-container {
        padding: 1.5rem 1rem !important;
        border-radius: 0 0 12px 12px !important;
    }
    
    .wc-next-portal .wc-portal-message-content {
        max-width: 85% !important;
    }
    
    .wc-next-portal .wc-portal-form-footer {
        flex-direction: row !important;
        gap: 0.75rem !important;
    }
    
    .wc-next-portal .wc-portal-textarea {
        min-height: 52px !important;
        padding: 1rem 1.25rem !important;
    }
    
    .wc-next-portal .wc-portal-section-title {
        font-size: 1.75rem !important;
    }
    
    /* Business Hours mobile responsiveness */
    .wc-next-portal .wc-chat-hours-content {
        flex-direction: row !important;
        text-align: left !important;
        gap: 1rem !important;
        padding: 1rem 1.25rem !important;
    }
    
    .wc-next-portal .wc-chat-hours-content i {
        width: 36px !important;
        height: 36px !important;
        font-size: 18px !important;
    }
    
    .wc-next-portal .wc-chat-hours-text {
        gap: 0.25rem !important;
    }
    
    .wc-next-portal .wc-hours-title,
    .wc-next-portal .wc-hours-time {
        font-size: 0.875rem !important;
    }
    
    .wc-next-portal .wc-hours-note {
        font-size: 0.75rem !important;
    }
}

@media (max-width: 480px) {
    .wc-next-portal .wc-brand-text h1 {
        font-size: 1.25rem !important;
    }
    
    .wc-next-portal .wc-ticket-number {
        font-size: 1.5rem !important;
    }
    
    .wc-next-portal .wc-portal-file-label,
    .wc-next-portal .wc-portal-submit-btn {
        padding: 0.625rem 1rem !important;
        font-size: 0.8125rem !important;
        height: 38px !important;
    }
    
    .wc-next-portal .wc-portal-message-content {
        max-width: 90% !important;
    }
}

/* File Upload Styling */
.wc-next-portal .wc-portal-file-input {
    display: none !important;
}

.wc-next-portal .wc-portal-file-list {
    margin-top: 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.wc-next-portal .wc-portal-file-item {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1rem !important;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    animation: slideInUp 0.3s ease-out !important;
}

.wc-next-portal .wc-file-thumbnail {
    flex-shrink: 0 !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.wc-next-portal .wc-file-preview-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.wc-next-portal .wc-file-thumbnail i {
    color: #64748b !important;
    font-size: 20px !important;
}

.wc-next-portal .wc-file-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
    min-width: 0 !important;
}

.wc-next-portal .wc-file-name {
    font-weight: 600 !important;
    color: #0f172a !important;
    font-size: 0.875rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.wc-next-portal .wc-file-size {
    color: #64748b !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.wc-next-portal .wc-portal-file-remove {
    flex-shrink: 0 !important;
    width: 36px !important;
    height: 36px !important;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #64748b !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    font-size: 16px !important;
    font-weight: bold !important;
}

.wc-next-portal .wc-portal-file-remove:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%) !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
    transform: scale(1.05) !important;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wc-next-portal .shake {
    animation: shake 0.5s ease-in-out !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Enhanced notification styles */
.wc-next-portal .wc-portal-closed-notice,
.wc-next-portal .wc-portal-auto-closed-banner {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%) !important;
    border: 1px solid #f59e0b !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    margin: 1rem 0 !important;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.1) !important;
}

.wc-next-portal .wc-portal-reopen-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3) !important;
}

.wc-next-portal .wc-portal-reopen-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 12px -2px rgba(59, 130, 246, 0.4) !important;
}