/* TCAsistencia Front-end Customer Help Center Styles */

.tcasistencia-landing {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Welcome Header */
.welcome-header {
    text-align: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.welcome-header h1 {
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.welcome-header .lead {
    font-size: 1.2rem;
    opacity: 0.9;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Compact Header Design */
.compact-header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 2rem 1.5rem;
    color: white;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.welcome-header-compact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    min-height: 120px;
}

.welcome-header-compact h1 {
    font-weight: 300;
    margin-bottom: 0.75rem;
    color: white;
    font-size: 2.5rem;
}

.welcome-header-compact .lead-compact {
    font-size: 1.1rem;
    opacity: 0.95;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    line-height: 1.4;
    margin-bottom: 0;
}

.search-section-compact {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.search-section-compact h5 {
    color: white;
    font-weight: 500;
}

.search-section-compact .text-primary {
    color: rgba(255, 255, 255, 0.9) !important;
}

.search-section-compact .btn-outline-secondary {
    border:1px;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
}

.search-section-compact .btn-outline-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.search-section-compact .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.search-section-compact .input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #333;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.search-section-compact .input-group .form-control:focus {
    background: white;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.search-section-compact .input-group .btn {
    position: relative;
    z-index: 2;
    background: #007bff;
    border-color: #007bff;
    font-weight: 500;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-left: none;
    padding: 0.75rem 1.25rem;
}

.search-section-compact .input-group .btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .welcome-header-compact h1 {
        font-size: 2rem;
        text-align: center;
    }
    
    .welcome-header-compact .lead-compact {
        text-align: center;
        font-size: 1rem;
    }
    
    .compact-header-section {
        padding: 1.5rem 1rem;
    }
    
    .search-section-compact {
        margin-top: 1rem;
    }
}

@media (max-width: 767.98px) {
    .welcome-header-compact h1 {
        font-size: 1.75rem;
    }
    
    .search-section-compact .btn-outline-secondary {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Navigation Steps */
.help-step {
    transition: all 0.3s ease;
}

.help-step.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Topic Cards */
.topic-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.topic-clickable {
    border: 2px solid transparent !important;
    transition: all 0.3s ease;
}

.topic-clickable:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.12) !important;
    border-color: #007bff !important;
}

.topic-icon {
    transition: transform 0.3s ease;
}

.topic-card:hover .topic-icon {
    color: #007bff;
}

.topic-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.topic-card .card-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.topic-card .card-text {
    flex-grow: 1;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Breadcrumb */
#help-breadcrumb {
    background: none;
    padding: 0;
}

#help-breadcrumb .breadcrumb {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 0.75rem 1rem;
}

#help-breadcrumb .breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

#help-breadcrumb .breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Solution Content */
#solution-content {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 1rem;
}

#solution-content h1, 
#solution-content h2, 
#solution-content h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

#solution-content p {
    margin-bottom: 1rem;
    color: #495057;
}

#solution-content ul, 
#solution-content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

#solution-content li {
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Solution Actions */
.solution-actions .card {
    border: none;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
}

.solution-actions .btn-group .btn {
    margin-right: 0.5rem;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.solution-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Solution Actions Buttons */
.solution-actions .btn {
    border-radius: 50px; /* Fully rounded buttons */
    padding: 12px 24px;
    font-weight: 600;
    text-transform: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#solution-helpful {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 25px !important; /* Añadido border-radius a todas las esquinas */
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

#solution-helpful:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(40, 167, 69, 0.4);
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
}

#solution-helpful:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

/* Success animation for the helpful button */
#solution-helpful.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 25px rgba(40, 167, 69, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    }
}

#need-more-help {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    border: none;
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

#need-more-help:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, #e0a800 0%, #e67e00 100%);
    color: #000;
}

/* Success message styling */
.success-message {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border-radius: 50px;
    padding: 15px 25px;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
    animation: slideInFromTop 0.5s ease-out;
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Form */
#contact-form {
    background: #ffffff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#contact-form .form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

#contact-form .form-control,
#contact-form .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease;
}

#contact-form .form-control:focus,
#contact-form .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Orders Section */
.orders-section .table {
    margin-bottom: 0;
}

.order-row {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.order-row:hover {
    background-color: #f8f9fa;
}

/* DROPDOWN Z-INDEX CRITICAL FIXES - Ensures dropdowns appear above all elements */
.dropdown {
    position: relative;
    z-index: 1000;
}

#wrapper .dropdown-menu {
    z-index: 9999 !important; /* Increased z-index for maximum priority */
    position: absolute !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 0.375rem !important;
    background-color: #fff !important;
    min-width: 200px;
    transform: none !important; /* Prevent transform issues */
    will-change: auto !important; /* Prevent hardware acceleration issues */
}

#wrapper .dropdown-menu.show {
    display: block !important;
    z-index: 9999 !important; /* Increased z-index for maximum priority */
    visibility: visible !important;
    opacity: 1 !important;
}

.dropdown-toggle::after {
    margin-left: 0.5rem;
}

.dropdown-item {
    padding: 0.5rem 1rem !important;
    transition: none !important; /* FIXED: Remove transition to prevent phantom clicks */
    color: #212529 !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center;
}

.dropdown-item:hover {
    background-color: #e9ecef !important;
    color: #1e2125 !important;
}

.dropdown-item:focus {
    background-color: #e9ecef !important;
    color: #1e2125 !important;
    outline: none !important;
}

.dropdown-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

/* Orders table specific fixes - Enhanced for dropdown visibility */
.orders-section .table-responsive {
    overflow: visible;
    position: static;
    transform: none; /* Prevent stacking context issues */
}

.orders-section table {
    position: relative;
    z-index: 1;
}

.orders-section tbody tr {
    position: static !important; /* Fixed: No stacking context on rows */
    z-index: auto !important; /* Fixed: No z-index on rows */
}

/* CRITICAL: TD containing dropdown needs position relative */
.orders-section tbody td:last-child {
    position: relative !important; /* Anchor for dropdown positioning */
}

.orders-section .dropdown {
    position: relative !important; /* Critical: relative to position menu correctly */
    z-index: 1000;
}

.orders-section .dropdown-menu {
    position: absolute !important;
    left: 0 !important; /* FIXED: Align to left edge of dropdown button */
    right: auto !important;
    transform: none !important;
    z-index: 9999 !important; /* Maximum priority */
    top: 100% !important; /* FIXED: Position directly below the button */
    margin-top: 2px !important;
    min-width: 200px;
}

/* Ensure dropdown buttons in tables are properly positioned */
.orders-section .dropdown-toggle {
    position: relative;
    z-index: 10;
}

.order-help-btn {
    transition: all 0.3s ease;
}

.order-help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,0,0,0.15);
}

/* Tickets Section */
.tickets-section .table tbody tr {
    transition: background-color 0.3s ease;
}

.tickets-section .table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    font-weight: 500;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    color: white;
}

/* Search Functionality */
.search-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    display: none; /* Oculto por defecto, se usa la versión compacta */
}

.search-bar-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    width: 100%;
}

.search-bar-container .form-control {
    flex-grow: 1;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.search-bar-container .btn {
    flex-shrink: 0;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    padding: 0.75rem 1rem;
    position: relative;
    z-index: 2;
    border-left: none;
}

/* FAQ Section */
.faq-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.faq-item {
    padding: 0.5rem 0;
    transition: all 0.2s ease;
}

.faq-item:hover {
    transform: translateX(5px);
}

.faq-item a {
    display: block;
    padding: 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.faq-item a:hover {
    background-color: rgba(0, 123, 255, 0.1);
    transform: translateX(8px);
}

/* Quick Actions - UPDATED */

.quick-action-item {
    padding: 1.5rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    height: 100%;
}

.quick-action-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quick-action-icon {
    transition: transform 0.3s ease;
}

.quick-action-item:hover .quick-action-icon {
    color: #007bff;
}

/* Feedback Section */
.solution-feedback {
    background: #fff3cd;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ffeaa7;
}

.solution-feedback textarea {
    resize: vertical;
    min-height: 60px;
}

/* Enhanced Feedback Section Styles */
.feedback-section {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.feedback-section:hover {
    border-color: #28a745;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.1);
}

.feedback-section.feedback-submitted {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Rounded Button Styles */
.btn-rounded {
    border-radius: 50px !important;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-rounded:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-rounded:hover:before {
    left: 100%;
}

.btn-success.btn-rounded {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    box-shadow: 0 2px 10px rgba(40, 167, 69, 0.3);
}

.btn-success.btn-rounded:hover {
    background: linear-gradient(135deg, #218838 0%, #1e9e84 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

.btn-outline-secondary.btn-rounded {
    border: 2px solid #6c757d;
    color: #6c757d;
    background: transparent;
}

.btn-outline-secondary.btn-rounded:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3);
}

/* Success Pulse Animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.successPulse {
    animation: successPulse 0.6s ease-in-out;
}

/* Feedback Button State Changes */
.btn-success-feedback {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    border-color: #28a745 !important;
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.5) !important;
}

.btn-outline-danger {
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}

.btn-outline-danger:hover {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

/* Enhanced Solution Display */
.solution-text {
    line-height: 1.8;
    font-size: 1.05rem;
    color: #495057;
}

.solution-text br + br {
    margin-bottom: 0.5rem;
}

.solution-header h2.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

/* Parent Topic Info Styling */
.parent-topic-info .card {
    border: 2px solid #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
    transition: all 0.3s ease;
}

.parent-topic-info .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.2);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%) !important;
}

.parent-topic-info .card-header .badge {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

.parent-topic-info .solution-content {
    line-height: 1.7;
    font-size: 1.05rem;
    color: #495057;
}

.bg-light-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%) !important;
    border-left: 4px solid #28a745;
}

.next-steps-info .alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%) !important;
    border-left: 4px solid #17a2b8;
}

.parent-topic-info h6 {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.parent-topic-info h6 i {
    color: inherit;
}

.parent-topic-info .text-primary h6 i {
    color: #007bff !important;
}

.parent-topic-info .text-success h6 i {
    color: #28a745 !important;
}

.parent-topic-info .text-info h6 i {
    color: #17a2b8 !important;
}

/* Enhanced Child Topics Display */
#child-topics-grid {
    margin-top: 1.5rem;
}

#child-topics-grid .child-topic-card {
    transition: all 0.3s ease;
}

#child-topics-grid .child-topic-card:hover {
    transform: translateY(-3px);
}

#child-topics-grid .card {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

#child-topics-grid .card:hover {
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.1);
}

/* Parent Topic Animation */
@keyframes parent-topic-slide-in {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.parent-topic-info {
    animation: parent-topic-slide-in 0.5s ease-out;
}
@media (max-width: 576px) {
    .parent-topic-info {
        margin-bottom: 1.5rem !important;
    }
    
    .parent-topic-info .card-body {
        padding: 1rem;
    }
    
    .parent-topic-info h6 {
        font-size: 1rem;
    }
}

/* Card Hover Effects */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Button Animations */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Comentado efecto hover de transformación para mejor UX
.btn:hover {
    transform: translateY(-2px);
} */

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transition: width 0.6s, height 0.6s;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* Card Headers */
.card-header {
    border-bottom: none;
    font-weight: 600;
    border-radius: 12px 12px 0 0 !important;
}

.card-header h3 {
    margin-bottom: 0;
    font-size: 1.2rem;
}

/* Enhanced Card Headers for Main Sections */
.help-navigation-section .card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 15px 15px 0 0;
    padding: 1rem 1.25rem;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.15);
}

.quick-actions-section .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px 15px 0 0;
    padding: 1rem 1.25rem;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.orders-section .card-header {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border-radius: 15px 15px 0 0;
    padding: 1rem 1.25rem;
    border: none;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.15);
}
.tickets-section .card-header {
    background: linear-gradient(135deg, #adadad 0%, #686868 100%);
    border-radius: 15px 15px 0 0;
    padding: 1rem 1.25rem;
    border: none;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.15);
}

/* Enhanced Card Body to match rounded headers */
.help-navigation-section .card,
.quick-actions-section .card,
.orders-section .card,
.tickets-section .card {
    border-radius: 15px !;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tickets-section .card {
    overflow: visible !important;
}

.help-navigation-section .card-body,
.quick-actions-section .card-body,
.orders-section .card-body,
.tickets-section .card-body {
    padding: 1.5rem 1.25rem;
}

/* Header text styling improvements */
.help-navigation-section .card-header h3,
.quick-actions-section .card-header h3,
.orders-section .card-header h3,
.tickets-section .card-header h3 {
    font-weight: 600;
    font-size: 1.3rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.help-navigation-section .card-header small,
.quick-actions-section .card-header small,
.orders-section .card-header small,
.tickets-section small {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Section spacing improvements */
.help-navigation-section,
.quick-actions-section,
.orders-section {
    margin-bottom: 2.5rem;
}

/* Badge styling for help navigation */
.help-navigation-section .badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Form Styling */
.form-control,
.form-select {
    background-color: #ffffff;
    border: 2px solid #e9ecef;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Table Styling */
.table {
    background-color: #ffffff;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
}

.table td {
    vertical-align: middle;
}

/* Back Button Styling */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #545b62 100%);
}

/* Success Animation */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.success-animation {
    animation: successPulse 0.6s ease-in-out;
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Smooth transitions for interactive elements - DROPDOWNS EXCLUDED */
* {
    transition: all 0.3s ease;
}

/* CRITICAL: Remove all transitions from dropdowns to prevent phantom clicks */
#wrapper .dropdown,
#wrapper .dropdown-menu,
#wrapper .dropdown-item {
    transition: none !important;
    animation: none !important;
}

/* Override Bootstrap dropdown animations */
#wrapper .dropdown-menu.show {
    transition: none !important;
    animation: none !important;
}

#wrapper .dropdown-menu:not(.show) {
    transition: none !important;
    animation: none !important;
}

/* Enhanced hover effects */
.card:hover,
.topic-clickable:hover {
    transform: translateY(-3px) scale(1.02);
}

/* Better mobile responsiveness */
@media (max-width: 576px) {
    .welcome-header h1 {
        font-size: 1.5rem;
    }
    
    .welcome-header .lead {
        font-size: 1rem;
    }
    
    .topic-card .card-body {
        padding: 0.75rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Animation improvements */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

/* Loading improvements */
.loading-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Error state styling */
.error-state {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Success state styling */
.success-state {
    color: #155724;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 1rem;
    margin: 1rem 0;
}

/* Keyboard Navigation Support */
.topic-card:focus,
.quick-action-item:focus,
.faq-item a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading States for Buttons */
.btn.loading {
    position: relative;
    color: transparent !important;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* CORREGIDO: Permitir scroll durante el tour para navegación 
   La clase tour-active ya no bloquea el scroll para permitir 
   navegación automática entre elementos del tour */

/* Help Tour Styles */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.tour-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* CORREGIDO: Solo cubrir el viewport actual */
    background: rgba(0, 0, 0, 0.7);
    pointer-events: all;
}

.tour-spotlight {
    position: fixed; /* CORREGIDO: fixed para permanecer en viewport */
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.8), /* Borde interno azul */
                0 0 0 9999px rgba(0, 0, 0, 0.7); /* Fondo oscurecido */
    background: transparent;
    z-index: 10001;
    transition: all 0.15s ease; /* ACELERADO: Reducido de 0.3s a 0.15s */
    pointer-events: none; /* CORREGIDO: El spotlight no debe interceptar eventos */
}

.tour-popup {
    position: fixed; /* CORREGIDO: fixed para permanecer en viewport */
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10003; /* CORREGIDO: Mayor z-index que el spotlight */
    pointer-events: all;
    max-width: 400px;
    min-width: 300px;
    animation: tourFadeIn 0.2s ease; /* ACELERADO: Reducido de 0.3s a 0.2s */
    /* CORREGIDO: Mejoras de posicionamiento */
    will-change: transform;
    transform: translateZ(0);
    border: 3px solid rgba(0, 124, 186, 0.8); /* CORREGIDO: Borde azul más visible */
    backdrop-filter: blur(10px); /* NUEVO: Efecto de desenfoque */
}

@keyframes tourFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-5px); } /* ACELERADO: Reducido translateY */
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.tour-popup-header {
    padding: 1rem 1rem 0.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: between;
    align-items: center;
}

.tour-popup-title {
    margin: 0;
    color: #007cba; /* CORREGIDO: Color azul más visible */
    font-size: 1.2rem; /* CORREGIDO: Tamaño más grande */
    font-weight: 700; /* CORREGIDO: Más negrita */
}

.tour-close {
    margin-left: auto;
    border: none;
    background: none;
    font-size: 1.4rem; /* CORREGIDO: Más grande */
    opacity: 0.8; /* CORREGIDO: Más visible */
    cursor: pointer;
    color: #333; /* CORREGIDO: Color más oscuro */
}

.tour-close:hover {
    opacity: 1;
    color: #007cba; /* CORREGIDO: Color azul al hacer hover */
}

.tour-popup-body {
    padding: 0.5rem 1rem;
}

.tour-popup-body p {
    margin: 0;
    color: #333; /* CORREGIDO: Color más oscuro para mejor legibilidad */
    line-height: 1.6; /* CORREGIDO: Mejor espaciado */
    font-size: 0.95rem; /* CORREGIDO: Tamaño de texto más adecuado */
    font-weight: 500; /* CORREGIDO: Peso de fuente más visible */
}

.tour-popup-footer {
    padding: 0.5rem 1rem 1rem;
}

.tour-progress .progress {
    height: 4px;
}

.tour-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem; /* NUEVO: Espacio adicional */
}

.tour-buttons .btn {
    font-size: 0.875rem;
    font-weight: 600; /* CORREGIDO: Más negrita */
    padding: 0.5rem 1rem; /* CORREGIDO: Padding más generoso */
    border-radius: 6px; /* CORREGIDO: Bordes redondeados */
    transition: all 0.15s ease; /* ACELERADO: Reducido de 0.2s a 0.15s */
}

.tour-buttons .btn-primary {
    background-color: #007cba; /* CORREGIDO: Color azul consistente */
    border-color: #007cba;
    color: white;
}

.tour-buttons .btn-primary:hover {
    background-color: #0056b3; /* CORREGIDO: Hover más oscuro */
    border-color: #0056b3;
    transform: translateY(-1px); /* NUEVO: Efecto de elevación */
}

.tour-buttons .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

.tour-buttons .btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
    transform: translateY(-1px); /* NUEVO: Efecto de elevación */
}

/* Order Products Modal */
#orderProductsModal {
    z-index: 1055 !important;
}

#orderProductsModal.show {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1050 !important;
}

#orderProductsModal .modal-dialog {
    max-width: 800px;
    margin: 1.75rem auto;
    position: relative;
    z-index: 1056;
}

#orderProductsModal .modal-content {
    position: relative;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
    z-index: 1057;
}

#orderProductsModal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

#orderProductsModal .modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#orderProductsModal .modal-header .btn-close:hover {
    opacity: 1;
}

#orderProductsModal .modal-body {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

#orderProductsModal .modal-footer {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #dee2e6;
}

/* Product selection styles */
#orderProductsModal .form-check {
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

#orderProductsModal .form-check:hover {
    border-color: #007bff;
    background-color: #f8f9fa;
}

#orderProductsModal .form-check-input:checked + .form-check-label {
    color: #007bff;
}

#orderProductsModal .form-check-input:checked ~ * {
    background-color: #e7f3ff;
}

#orderProductsModal .form-check-label {
    cursor: pointer;
    width: 100%;
}

#orderProductsModal .img-thumbnail {
    border: 1px solid #dee2e6;
}

/* Loading spinner */
#products-loading {
    text-align: center;
    padding: 2rem;
}

#products-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

.product-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent !important;
}

.product-card:hover {
    border-color: #007bff !important;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
}

.product-card .card-body {
    padding: 1rem;
}

.product-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
}

.product-card .select-product-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.product-card .select-product-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.product-card img {
    border-radius: 8px;
    max-height: 60px;
    object-fit: cover;
}

/* Loading states */
#products-loading {
    padding: 3rem 0;
}

#products-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Product selection enhancement */
.product-card.selected {
    border-color: #28a745 !important;
    background: rgba(40, 167, 69, 0.05);
}

.product-card.selected .select-product-btn {
    background-color: #28a745;
    border-color: #28a745;
}

.product-card.selected .select-product-btn i {
    animation: checkBounce 0.5s ease;
}

@keyframes checkBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* CRITICAL TABLE AND DROPDOWN FIXES */
.table-responsive {
    overflow: visible !important;
    position: static !important;
    transform: none !important;
    contain: none !important; /* Prevent CSS containment issues */
}

.table-responsive::-webkit-scrollbar {
    display: none;
}

.table-responsive {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ensure dropdown menus work properly in tables with maximum z-index */
.table .dropdown {
    position: static !important; /* Changed from static to relative */
    z-index: 1000;
}

.table .dropdown-menu {
    position: absolute !important;
    z-index: 9999 !important; /* Increased from 1050 to 9999 */
    left: 0 !important; /* Align to left edge of dropdown container */
    right: auto !important;
    margin-top: 5px !important;
    transform: none !important;
    will-change: auto !important;
    min-width: 200px;
}

/* Additional override for any conflicting styles */
.table .dropdown-menu.show {
    z-index: 9999 !important;
    position: absolute !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix for Bootstrap table responsive issues with dropdowns */
.orders-section {
    overflow: visible !important;
    position: static !important;
    transform: none !important;
}

.orders-section .card {
    overflow: visible !important;
    position: static !important;
    transform: none !important;
}

.orders-section .card-body {
    overflow: visible !important;
    padding: 1rem;
    position: static !important;
    transform: none !important;
}

/* Ensure proper stacking context and prevent any interference */
.tcasistencia-landing {
    position: relative;
    z-index: 1;
    transform: none !important;
    contain: none !important;
}

.tcasistencia-landing .container,
.tcasistencia-landing .container-fluid {
    position: relative;
    z-index: 1;
    transform: none !important;
    contain: none !important;
}

/* Global override to prevent any element from interfering with dropdowns */
.tcasistencia-landing * {
    contain: none !important;
}

/* Specific override for any Bootstrap modals or overlays that might interfere */
.modal {
    z-index: 1040 !important; /* Lower than dropdown menus */
}

.modal-backdrop {
    z-index: 1030 !important; /* Lower than dropdown menus */
}

/* Prevent any other elements from creating stacking contexts above dropdowns */
.tcasistencia-landing .card,
.tcasistencia-landing .alert,
.tcasistencia-landing .navbar,
.tcasistencia-landing .nav {
    z-index: auto !important;
    transform: none !important;
    contain: none !important;
}

/* EMERGENCY DROPDOWN Z-INDEX FIXES - Last resort rules */
/* These rules have maximum specificity and priority */
.tcasistencia-landing .orders-section .table .dropdown .dropdown-menu,
.tcasistencia-landing .dropdown .dropdown-menu.show,
.tcasistencia-landing .dropdown-menu[data-bs-popper] {
    z-index: 9999 !important;
    position: absolute !important;
    transform: none !important;
    will-change: auto !important;
    contain: none !important;
    pointer-events: auto !important;
}

/* Ensure dropdown items are always clickable */
.dropdown-item {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 10000 !important;
}

/* Force remove any transforms that could create stacking contexts */
.tcasistencia-landing .card,
.tcasistencia-landing .table-responsive,
.tcasistencia-landing .orders-section {
    transform: none !important;
    will-change: auto !important;
    contain: none !important;
}

/* ========================================
   ESTILOS PARA USUARIOS NO LOGUEADOS
   ======================================== */

/* Contenedor principal para usuarios no logueados */
.tcasistencia-landing .container .row {
    margin: 0 -15px;
}

.tcasistencia-landing .container .col-md-8,
.tcasistencia-landing .container .col-md-4 {
    padding: 0 15px;
}

/* Estilos para tarjetas de temas de usuarios no logueados */
.help-topics-section .topic-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.help-topics-section .topic-card .card {
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.help-topics-section .topic-card .card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.help-topics-section .topic-card .card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.help-topics-section .topic-card .card:hover:before {
    transform: scaleX(1);
}

.help-topics-section .topic-icon {
    transition: all 0.3s ease;
}

.help-topics-section .topic-card:hover .topic-icon i {
    color: #007bff !important;
    transform: scale(1.1);
}

/* Botones de exploración de temas */
.explore-topic-btn {
    transition: all 0.3s ease;
    border-radius: 20px;
    padding: 0.375rem 1rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.explore-topic-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.explore-topic-btn:hover:before {
    left: 100%;
}

.explore-topic-btn.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.3);
}

.explore-topic-btn.btn-outline-primary:hover {
    background: linear-gradient(135deg, #007bff, #0056b3);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Sección de formulario de contacto */
.contact-form-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.contact-form-section:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #0056b3, #007bff);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.contact-form-section h5 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
}

.contact-form-section h5:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 2px;
    background: #007bff;
    border-radius: 1px;
}

/* Estilos de formulario mejorados */
#guestContactForm .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

#guestContactForm .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

#guestContactForm .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
    transform: translateY(-1px);
}

#guestContactForm .form-control::placeholder {
    color: #adb5bd;
    font-style: italic;
}

#guestContactForm textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Botón de envío del formulario */
#guestContactForm button[type="submit"] {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#guestContactForm button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

#guestContactForm button[type="submit"]:active {
    transform: translateY(0);
}

/* Columna derecha - Beneficios de cuenta */
.col-md-4 .card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.col-md-4 .card-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    padding: 1.5rem;
    position: relative;
}

.col-md-4 .card-header:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.col-md-4 .card-header h4 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-weight: 600;
}

.col-md-4 .card-body {
    padding: 2rem;
    background: #fff;
}

/* Lista de beneficios */
.col-md-4 .list-unstyled li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.3s ease;
}

.col-md-4 .list-unstyled li:last-child {
    border-bottom: none;
}

.col-md-4 .list-unstyled li:hover {
    background: rgba(40, 167, 69, 0.05);
    padding-left: 0.5rem;
    border-radius: 5px;
}

.col-md-4 .list-unstyled li i {
    font-size: 1.1rem;
    width: 20px;
}

/* Botones de acción */
.col-md-4 .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.col-md-4 .btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.col-md-4 .btn-outline-success {
    border: 2px solid #28a745;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.col-md-4 .btn-outline-success:hover {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: #28a745;
    transform: translateY(-1px);
}

/* Tarjeta de información adicional */
.col-md-4 .card:last-child .card-body {
    text-align: center;
    padding: 1.5rem;
}

.col-md-4 .card:last-child h6 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1rem;
}

.col-md-4 .card:last-child .btn-sm {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.col-md-4 .card:last-child .btn-outline-primary:hover,
.col-md-4 .card:last-child .btn-outline-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Efectos de resaltado temporal */
.contact-form-section.highlight {
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {
    0%, 100% { background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); }
    50% { background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%); }
}

@media (max-width: 576px) {
    .contact-form-section {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    #guestContactForm .form-control {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }
    
    #guestContactForm button[type="submit"] {
        padding: 0.625rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .col-md-4 .btn-success,
    .col-md-4 .btn-outline-success {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Simplified Feedback Container Layout */
.feedback-container {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    min-height: 60px;
}

.feedback-container:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.feedback-question h6 {
    color: #495057;
    font-weight: 500;
    margin-bottom: 0;
}

.feedback-question .fas {
    color: #007bff;
}

/* Simplified Feedback Buttons with Descriptive Text */
.feedback-buttons {
    flex-shrink: 0;
}

.feedback-buttons .btn {
    min-width: 120px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    padding: 0.5rem 0.75rem;
    line-height: 1.2;
    text-align: center;
}

.feedback-buttons .btn .btn-text {
    display: block;
    line-height: 1.1;
}

.feedback-buttons .btn .btn-text strong {
    font-size: 0.85rem;
    font-weight: 600;
}

.feedback-buttons .btn .btn-text small {
    font-size: 0.7rem;
    opacity: 0.9;
    font-weight: 400;
}

.feedback-buttons .btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.4s;
}

.feedback-buttons .btn:hover:before {
    left: 100%;
}

.feedback-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

.feedback-buttons .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
}

.feedback-buttons .btn-success:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
}

.feedback-buttons .btn-warning {
    background: linear-gradient(135deg, #ffc107, #ff8c00);
    border: none;
    color: #fff;
}

.feedback-buttons .btn-warning:hover {
    background: linear-gradient(135deg, #e0a800, #e67e00);
    color: #fff;
}

.feedback-buttons .btn-info {
    background: linear-gradient(135deg, #17a2b8, #007bff);
    border: none;
}

.feedback-buttons .btn-info:hover {
    background: linear-gradient(135deg, #138496, #0056b3);
}
/* Success state for feedback container */
.feedback-container.feedback-submitted {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #28a745;
}

/* ===== DYNAMIC FAQ STYLES ===== */

.dynamic-faq-indicator {
    text-align: right;
}

.dynamic-faq-indicator .badge {
    border: 1px solid #b3d4fc;
    font-size: 0.75rem;
}

.topic-card[data-priority="high"] .card {
    border-left: 4px solid #dc3545 !important;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.1) !important;
}

.topic-card[data-priority="medium"] .card {
    border-left: 4px solid #ffc107 !important;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.1) !important;
}

.topic-card[data-priority="low"] .card {
    border-left: 4px solid #28a745 !important;
}

.topic-stats {
    font-size: 0.85rem;
}

.card-header.bg-warning {
    border-bottom: 1px solid rgba(0,0,0,.125);
}

.priority-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 10;
}

.topic-card:hover .priority-badge {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Analytics indicators */
.analytics-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.analytics-summary .stat {
    text-align: center;
}

.analytics-summary .stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}

.analytics-summary .stat-label {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Feedback improvements */
.feedback-buttons {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.feedback-buttons .btn {
    margin: 0.25rem;
    transition: all 0.2s ease;
}

.feedback-buttons .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.feedback-buttons .btn.selected {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

.feedback-thanks {
    margin-top: 0.5rem;
    color: #28a745;
    font-weight: 500;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dynamic ordering notification */
.dynamic-ordering-notice {
    background: linear-gradient(45deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    box-shadow: 0 2px 10px rgba(79, 172, 254, 0.3);
}

.dynamic-ordering-notice i {
    margin-right: 0.5rem;
}

/* Topic prioritization visual cues */
.topic-card[data-has-negative-feedback="true"] {
    position: relative;
}

.topic-card[data-has-negative-feedback="true"]::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.1;
}

/* Dynamic FAQ Styles */
.dynamic-faq-item {
    position: relative;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.5rem;
}

.dynamic-faq-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dynamic-faq-item a {
    color: inherit;
    text-decoration: none !important;
}

.faq-title {
    font-weight: 500;
    color: #495057;
}

.faq-stats {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.faq-stats i {
    width: 12px;
    text-align: center;
}

/* Priority indicators */
.dynamic-faq-item[data-priority-score] {
    position: relative;
}

.dynamic-faq-item[data-priority-score]:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 2px;
    background: transparent;
}

/* High priority (score > 5) */
.dynamic-faq-item[data-priority-score^="1"]:before,
.dynamic-faq-item[data-priority-score^="2"]:before,
.dynamic-faq-item[data-priority-score^="3"]:before,
.dynamic-faq-item[data-priority-score^="4"]:before,
.dynamic-faq-item[data-priority-score^="5"]:before,
.dynamic-faq-item[data-priority-score^="6"]:before,
.dynamic-faq-item[data-priority-score^="7"]:before,
.dynamic-faq-item[data-priority-score^="8"]:before,
.dynamic-faq-item[data-priority-score^="9"]:before {
    background: linear-gradient(to bottom, #dc3545, #c82333);
}

/* Medium priority (score 2-5) */
.dynamic-faq-item[data-priority-score^="2"]:before,
.dynamic-faq-item[data-priority-score^="3"]:before,
.dynamic-faq-item[data-priority-score^="4"]:before,
.dynamic-faq-item[data-priority-score^="5"]:before {
    background: linear-gradient(to bottom, #ffc107, #e0a800);
}

/* High priority items get special styling */
.dynamic-faq-item[data-priority-score^="1"] .faq-title,
.dynamic-faq-item[data-priority-score^="2"] .faq-title,
.dynamic-faq-item[data-priority-score^="3"] .faq-title,
.dynamic-faq-item[data-priority-score^="4"] .faq-title,
.dynamic-faq-item[data-priority-score^="5"] .faq-title,
.dynamic-faq-item[data-priority-score^="6"] .faq-title,
.dynamic-faq-item[data-priority-score^="7"] .faq-title,
.dynamic-faq-item[data-priority-score^="8"] .faq-title,
.dynamic-faq-item[data-priority-score^="9"] .faq-title {
    font-weight: 600;
    color: #495057;
}

/* Badge styles for dynamic FAQs */
.badge.bg-danger {
    animation: pulseRed 2s infinite;
}

@keyframes pulseRed {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.badge.bg-success {
    background-color: #28a745 !important;
}

/* Show more FAQs button */
#show-more-faqs {
    border-radius: 20px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

#show-more-faqs:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

/* Dynamic FAQ section header */
.faq-section h5 {
    position: relative;
}

.faq-section h5 .badge {
    font-size: 0.6em;
    position: relative;
    top: -2px;
}
/* Animation for when FAQs are reordered */
.dynamic-faq-item.reordering {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Special styling for problematic topics */
.dynamic-faq-item.high-issues {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border-left: 4px solid #fc8181;
}

.dynamic-faq-item.high-issues:hover {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
}

/* ============================================
   TICKET DETAILS MODAL STYLES
   ============================================ */

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    overflow: auto;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 15px;
    pointer-events: none;
}

.modal-xl {
    max-width: 95%;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 90vh;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: 9px;
    border-top-right-radius: 9px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-header .modal-title {
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

.btn-close {
    padding: 0.375rem 0.75rem;
    margin: -0.375rem -0.75rem -0.375rem auto;
    background: transparent;
    border: 0;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.15s ease-in-out;
}

.btn-close:hover {
    opacity: 1;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

/* Ticket Details Styles */
.ticket-details {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.ticket-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
}

.ticket-header h3 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.ticket-header h4 {
    color: #6c757d;
    font-weight: 400;
}

.ticket-info {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

/* Conversation Styles */
.conversation-container {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #fff;
}

.conversation-item {
    border-bottom: 1px solid #e9ecef;
}

.conversation-item:last-child {
    border-bottom: none;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.message-header strong {
    color: #495057;
}

.message-content {
    line-height: 1.6;
    word-wrap: break-word;
}

/* Attachments con miniaturas */
.attachments {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Para mensajes del cliente (fondo azul) */
.timeline-item.customer-message .attachments {
    border-top-color: rgba(255, 255, 255, 0.2);
}

/* Para mensajes del admin (fondo gris) */
.timeline-item.admin-message .attachments {
    border-top-color: #dee2e6;
}

.customer-message .message-content p{
    color: #ffffff;
}
.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

/* Contenedor individual de cada adjunto */
.attachment-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    border-radius: 12px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    min-width: 80px;
    max-width: 120px;
}

.attachment-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Para mensajes del admin, fondo diferente */
.timeline-item.admin-message .attachment-item {
    background: rgba(0, 0, 0, 0.05);
}

.timeline-item.admin-message .attachment-item:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Miniatura de imagen */
.attachment-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    object-position: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.4rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.attachment-thumbnail:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Para mensajes del admin */
.timeline-item.admin-message .attachment-thumbnail {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.timeline-item.admin-message .attachment-thumbnail:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

/* Icono para archivos no imagen */
.attachment-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 0.4rem;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
}

.timeline-item.admin-message .attachment-icon {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #6c757d;
}

/* Diferentes iconos según tipo de archivo */
.attachment-icon.pdf { color: #dc3545; }
.attachment-icon.doc { color: #0056b3; }
.attachment-icon.txt { color: #28a745; }
.attachment-icon.zip { color: #ffc107; }

.timeline-item.admin-message .attachment-icon.pdf { color: #dc3545; }
.timeline-item.admin-message .attachment-icon.doc { color: #0056b3; }
.timeline-item.admin-message .attachment-icon.txt { color: #28a745; }
.timeline-item.admin-message .attachment-icon.zip { color: #ffc107; }

/* Nombre del archivo */
.attachment-name {
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
    word-break: break-word;
    color: inherit;
    margin: 0;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Indicador de descarga */
.attachment-download {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.attachment-item:hover .attachment-download {
    opacity: 1;
}

/* Estilos para botones tradicionales (fallback) */
.attachment-list .btn {
    font-size: 0.875rem;
    text-decoration: none;
    display: none; /* Ocultar botones tradicionales cuando hay miniaturas */
}

/* Response Form */
.response-form {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    margin-top: 1rem;
}

.response-form h5 {
    color: #495057;
    margin-bottom: 1rem;
}

.response-form .form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.response-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Ticket Subject Container */
.ticket-subject-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ticket-actions {
    display: flex;
    gap: 0.5rem;
}

.view-ticket-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.view-ticket-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

.badge.fs-6 {
    font-size: 1rem !important;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Loading Animation */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* ===============================================
   MODAL DE TICKETS - ESTILOS ESPECÍFICOS (VERSIÓN ROBUSTA)
   =============================================== */

/* Modal específico para tickets - Evita conflictos con Bootstrap */
.tcasistencia-modal {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important; /* Máxima prioridad */
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(3px) !important;
    overflow: auto !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

.tcasistencia-modal.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tcasistencia-modal-dialog {
    margin: 20px auto !important;
    background: white !important;
    border-radius: 12px !important;
    max-width: 1140px !important;
    width:         95% !important;
    max-height: calc(100vh - 40px) !important;
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
    animation: tcModalSlideIn 0.3s ease-out !important;
}

@keyframes tcModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tcasistencia-modal-content {
    border: none !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

.tcasistencia-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-radius: 12px 12px 0 0 !important;
    padding: 1.5rem 2rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: none !important;
    flex-shrink: 0 !important;
}

.tcasistencia-modal-title {
    margin: 0 !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: white !important;
}

.tcasistencia-modal-close {
    border: none !important;
    background: none !important;
    color: white !important;
    font-size: 1.8rem !important;
    cursor: pointer !important;
    padding: 0 !important;
    line-height: 1 !important;
    opacity: 0.8 !important;
    transition: all 0.2s ease !important;
    width: 30px !important;
    height: 30px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
}

.tcasistencia-modal-close:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1) !important;
}

.tcasistencia-modal-body {
    padding: 2rem !important;
    overflow-y: auto !important;
    flex: 1 !important;
    background: white !important;
}

/* Contenido específico del ticket */
.tcasistencia-modal .ticket-details {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.tcasistencia-modal .ticket-header {
    border-bottom: 2px solid #f0f0f0 !important;
    padding-bottom: 1.5rem !important;
    margin-bottom: 2rem !important;
}

.tcasistencia-modal .ticket-header h3 {
    color: #333 !important;
    margin-bottom: 0.5rem !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

.tcasistencia-modal .ticket-header h4 {
    color: #666 !important;
    font-weight: 400 !important;
    font-size: 1.1rem !important;
}

.tcasistencia-modal .ticket-info {
    background: #f8f9fa !important;
    padding: 1rem 1.5rem !important;
    border-radius: 8px !important;
    margin-bottom: 2rem !important;
}

.tcasistencia-modal .conversation-container {
    max-height: 450px !important;
    overflow-y: auto !important;
    border: 2px solid #e9ecef !important;
    border-radius: 10px !important;
    background: #fff !important;
    margin-bottom: 2rem !important;
}

.tcasistencia-modal .conversation-item {
    padding: 1.5rem !important;
    border-bottom: 1px solid #eee !important;
    transition: background 0.2s ease !important;
}

.tcasistencia-modal .conversation-item:last-child {
    border-bottom: none !important;
}

.tcasistencia-modal .conversation-item.customer-message {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4fd 100%) !important;
    border-left: 4px solid #667eea !important;
}

.tcasistencia-modal .conversation-item.admin-message {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%) !important;
    border-left: 4px solid #28a745 !important;
}

.tcasistencia-modal .message-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0.75rem !important;
}

.tcasistencia-modal .message-header strong {
    color: #333 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
}

.tcasistencia-modal .message-content {
    color: #555 !important;
    line-height: 1.6 !important;
    white-space: pre-wrap !important;
    font-size: 0.95rem !important;
}

.tcasistencia-modal .response-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 12px !important;
    padding: 2rem !important;
    border: 2px solid #e9ecef !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
}

.tcasistencia-modal .response-form h5 {
    color: #333 !important;
    margin-bottom: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
}

.tcasistencia-modal .response-form .form-control {
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    padding: 0.875rem !important;
    transition: all 0.2s ease !important;
    font-size: 0.95rem !important;
}

.tcasistencia-modal .response-form .form-control:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
    outline: none !important;
}

.tcasistencia-modal .response-form .btn {
    padding: 0.75rem 2rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
    border: none !important;
}

.tcasistencia-modal .response-form .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
}

.tcasistencia-modal .response-form .btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

.tcasistencia-modal .response-form .btn-secondary {
    background: #6c757d !important;
    color: white !important;
}

.tcasistencia-modal .response-form .btn-secondary:hover {
    background: #5a6268 !important;
    transform: translateY(-1px) !important;
}

/* Badges y estados */
.tcasistencia-modal .badge {
    font-size: 0.9rem !important;
    padding: 0.5rem 0.8rem !important;
    border-radius: 20px !important;
    font-weight: 500 !important;
}

.tcasistencia-modal .badge.bg-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
}

/* Loading states */
.tcasistencia-modal .loading-spinner {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 300px !important;
    flex-direction: column !important;
}

/* Estilo para el botón de envío cuando está cargando */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ============================================
   SECCIÓN DE INFORMACIÓN DEL TICKET (COMPACTA)
   ============================================ */

.ticket-info-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0;
    border: 1px solid #dee2e6;
    margin-bottom: 1rem;
}

.ticket-info-section h5 {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.ticket-info-section .card {
    border: none;
    border-radius: 0 0 8px 8px;
    box-shadow: none;
}

.ticket-info-section .card-body {
    padding: 0.75rem;
}

.ticket-info-section .row > div {
    margin-bottom: 0.4rem;
}

.ticket-info-section .row > div:last-child {
    margin-bottom: 0;
}

.ticket-info-section small {
    font-size: 0.7em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6c757d;
}

.ticket-info-section .fw-bold {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85em;
    margin-top: 0.15rem;
}

.ticket-info-section .badge {
    font-size: 0.7em;
    padding: 0.25em 0.5em;
    border-radius: 12px;
    font-weight: 500;
}

.ticket-info-section a {
    color: #007bff;
    transition: all 0.3s ease;
    font-size: 0.85em;
}

.ticket-info-section a:hover {
    color: #0056b3;
    text-decoration: underline !important;
}

/* Responsive para la sección de información */
@media (max-width: 991px) {
    .ticket-info-section {
        margin-bottom: 1rem;
    }
}

/* ============================================
   ESTILOS DE TIMELINE/CONVERSACIÓN ESTILO WHATSAPP
   ============================================ */

/* Timeline principal */
.conversation-timeline {
    position: relative;
    padding: 0.5rem 0;
    max-width: 100%;
}

/* Eliminar la línea central del timeline */
.conversation-timeline::before {
    display: none;
}

/* Item de timeline base */
.timeline-item {
    position: relative;
    margin-bottom: 1rem;
    padding: 0;
    opacity: 0;
    animation: fadeInTimeline 0.5s ease-in-out forwards;
    display: flex;
    align-items: flex-end;
    clear: both;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item.new-message {
    animation: newMessageAppear 0.6s ease-in-out forwards;
}

/* MENSAJES DEL CLIENTE (DERECHA) */
.timeline-item.customer-message {
    justify-content: flex-end;
    padding-left: 20%;
}

.timeline-item.customer-message .timeline-marker {
    position: relative;
    order: 2;
    margin-left: 0.75rem;
    margin-right: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff, #0056b3);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    border: 2px solid white;
    flex-shrink: 0;
}

.timeline-item.customer-message .timeline-content {
    order: 1;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 18px 18px 4px 18px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 12px rgba(0, 123, 255, 0.2);
    border: none;
    position: relative;
    max-width: 100%;
}

.timeline-item.customer-message .timeline-content::before {
    content: '';
    position: absolute;
    right: -8px;
    bottom: 4px;
    width: 0;
    height: 0;
    border-left: 8px solid #0056b3;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.timeline-item.customer-message .timeline-header strong {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85em;
}

.timeline-item.customer-message .timeline-header small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75em;
    padding-left: 20px;
}

/* MENSAJES DEL ADMIN (IZQUIERDA) */
.timeline-item.admin-message {
    justify-content: flex-start;
    padding-right: 20%;
}

.timeline-item.admin-message .timeline-marker {
    position: relative;
    order: 1;
    margin-right: 0.75rem;
    margin-left: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    border: 2px solid white;
    flex-shrink: 0;
}

.timeline-item.admin-message .timeline-content {
    order: 2;
    background: #f1f3f4;
    color: #2c3e50;
    border-radius: 18px 18px 18px 4px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    position: relative;
    max-width: 100%;
}

.timeline-item.admin-message .timeline-content::before {
    content: '';
    position: absolute;
    left: -8px;
    bottom: 4px;
    width: 0;
    height: 0;
    border-right: 8px solid #f1f3f4;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.timeline-item.admin-message .timeline-header strong {
    color: #2c3e50;
    font-size: 0.85em;
}

.timeline-item.admin-message .timeline-header small {
    color: #6c757d;
    font-size: 0.75em;
}

/* Iconos en los marcadores */
.timeline-marker i {
    font-size: 14px;
    color: white;
}

/* Header del timeline común */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
    border-bottom: none;
}

.timeline-header strong {
    font-weight: 600;
}

/* Cuerpo del timeline */
.timeline-body {
    line-height: 1.5;
}

.message-content {
    font-size: 0.95rem;
    word-wrap: break-word;
}

/* Hover effects */
.timeline-item.customer-message .timeline-content:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
}

.timeline-item.admin-message .timeline-content:hover {
    background: #e9ecef;
    transform: translateY(-1px);
}

/* Animaciones mejoradas */
@keyframes fadeInTimeline {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes newMessageAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    50% {
        opacity: 1;
        transform: translateY(0) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================
   COMPACT FAQ INTEGRATION STYLES
   ============================================ */

/* FAQ badge indicator */
.faq-badge {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
    transition: all 0.15s ease;
}

.faq-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* FAQ separator line */
.faq-separator {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
    margin: 1rem 0;
}

/* Compact FAQ container */
.compact-faq {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-left: 3px solid #28a745;
    transition: all 0.15s ease;
}

.compact-faq:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

/* Compact FAQ buttons */
.compact-faq .btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.15s ease;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

.compact-faq .btn-outline-success {
    border-color: #28a745;
    color: #28a745;
    background: white;
}

.compact-faq .btn-outline-success:hover {
    background: #28a745;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.25);
}

.compact-faq .fas {
    font-size: 0.8rem;
    margin-right: 0.4rem;
    width: 12px;
    text-align: center;
}
/* ============================================
   BOTONES - SOLUCIÓN PROBLEMA BORDER HOVER
   ============================================ */

/* SOLUCIÓN: Todos los botones outline-secondary tendrán border transparente por defecto
   y solo cambiará el color del border en hover, NO añadirá/quitará border */
.btn-outline-secondary {
    border: 1px solid transparent !important;
    background-color: transparent;
    color: #6c757d;
    transition: all 0.15s ease-in-out;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
    border: 1px solid #6c757d !important;
    background-color: #6c757d;
    color: #fff;
    /* NO cambiar tamaño del botón */
    transform: none;
}

.btn-outline-secondary:disabled,
.btn-outline-secondary.disabled {
    border: 1px solid transparent !important;
    background-color: transparent;
    color: #6c757d;
    opacity: 0.65;
}

.btn-outline-secondary:disabled:hover,
.btn-outline-secondary.disabled:hover {
    border: 1px solid transparent !important;
    background-color: transparent;
    color: #6c757d;
}

/* Asegurar que todos los botones mantengan el mismo box-sizing */
.btn {
    box-sizing: border-box !important;
}

/* Clase de highlight para secciones */
.highlight-section {
    animation: highlight-pulse 2s ease-in-out;
    border-radius: 8px;
}

@keyframes highlight-pulse {
    0% { 
        background-color: transparent; 
        box-shadow: none;
    }
    50% { 
        background-color: rgba(0, 123, 255, 0.1); 
        box-shadow: 0 0 20px rgba(0, 123, 255, 0.3);
    }
    100% { 
        background-color: transparent; 
        box-shadow: none;
    }
}

/* Product Selection Styles */
.product-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    border-color: #dee2e6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-card.selected-product {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2) !important;
    transform: translateY(-3px);
}

.product-card.selected-product .card-body {
    position: relative;
}

.product-card.selected-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 6px 6px 0 0;
}

.product-checkbox {
    transform: scale(1.2);
    accent-color: #28a745;
}

.product-card .form-check-label {
    cursor: pointer;
    margin-bottom: 0;
}

.product-card .form-check-label:hover h6 {
    color: #007bff;
}

.selected-product .form-check-label h6 {
    color: #28a745;
    font-weight: 600;
}

#selected-products-count .badge {
    font-size: 0.8rem;
    padding: 0.4em 0.6em;
    animation: badge-pulse 0.3s ease;
}

@keyframes badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.text-success .badge {
    background-color: #28a745 !important;
}

/* Animation for products list showing/hiding */
#products-list, #products-grid {
    overflow: hidden;
}

/* Enhanced visual feedback for selections */
.product-card.selected-product .product-checkbox {
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
}

.product-card.selected-product .card-title {
    position: relative;
}

.product-card.selected-product .card-title::after {
    content: '✓';
    position: absolute;
    right: 0;
    top: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1em;
}

/* Estilos específicos para formulario de productos */
.product-card-form {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.product-card-form:hover {
    border-color: #dee2e6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.product-card-form.selected-product {
    border-color: #28a745 !important;
    background-color: rgba(40, 167, 69, 0.05);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2) !important;
    transform: translateY(-3px);
}

.product-card-form.selected-product .card-body {
    position: relative;
}

.product-card-form.selected-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #28a745, #20c997);
    border-radius: 6px 6px 0 0;
    z-index: 999;
}

.product-card-form .form-check-input {
    transform: scale(1.2);
    accent-color: #28a745;
}

.product-card-form .form-check-label {
    cursor: pointer;
    margin-bottom: 0;
    padding: 0;
}

.product-card-form .form-check-label:hover .card-title {
    color: #007bff;
}

.product-card-form.selected-product .card-title {
    color: #28a745;
    font-weight: 600;
    position: relative;
}

.product-card-form.selected-product .card-title::after {
    content: '✓';
    position: absolute;
    right: 0;
    top: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .parent-topic-info .card-header .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .parent-topic-info .card-header .badge {
        margin-top: 0.5rem;
    }
    
    .parent-topic-info h4 {
        font-size: 1.3rem;
    }
    
    .parent-topic-info .solution-content {
        font-size: 1rem;
    }
    .tour-popup {
        max-width: calc(100vw - 20px);
        left: 10px !important;
        right: 10px !important;
        width: auto !important;
    }
      .tour-buttons {
        flex-direction: column;
    }
    
    .tour-buttons .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    #orderProductsModal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .product-card .row .col-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    
    .product-card .row .col-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }
    
    .product-card .card-title {
        font-size: 0.85rem;
    }
    
    .product-card .select-product-btn {
        font-size: 0.75rem;
        padding: 0.2rem 0.5rem;
    }
    #wrapper .dropdown-menu {
        min-width: 180px !important;
        font-size: 0.9rem;
        z-index: 9999 !important; /* Ensure mobile dropdowns are also above everything */
    }
    
    .dropdown-item {
        padding: 0.4rem 0.8rem !important;
    }
    
    .dropdown-item i {
        font-size: 0.8rem;
    }
    
    /* Ensure mobile table dropdowns work properly */
    .table-responsive {
        overflow-x: auto !important;
        overflow-y: visible !important;
    }
    
    .orders-section .dropdown-menu {
        right: 0 !important;
        left: auto !important;
        z-index: 9999 !important;
    }
    .tcasistencia-landing .container .row {
        margin: 0;
    }
    
    .tcasistencia-landing .container .col-md-8,
    .tcasistencia-landing .container .col-md-4 {
        padding: 0 10px;
        margin-bottom: 2rem;
    }
    
    .contact-form-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .col-md-4 .card-header,
    .col-md-4 .card-body {
        padding: 1.5rem;
    }
    
    .help-topics-section .row .col-md-6 {
        margin-bottom: 1rem;
    }
        .feedback-container {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .feedback-question {
        margin-right: 0 !important;
        margin-bottom: 0.5rem;
    }
    
    .feedback-buttons {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .feedback-buttons .btn {
        min-width: 110px;
        margin-bottom: 0.5rem;
        font-size: 0.75rem;
    }
    
    .feedback-buttons .btn .btn-text strong {
        font-size: 0.8rem;
    }
    
    .feedback-buttons .btn .btn-text small {
        font-size: 0.65rem;
    }
    .dynamic-faq-item {
        margin-bottom: 0.75rem;
    }
    
    .faq-stats {
        margin-top: 0.5rem;
    }
    
    .dynamic-faq-item a {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dynamic-faq-item .badge {
        margin-top: 0.5rem;
        margin-left: 0 !important;
    }
    .attachment-list {
        gap: 0.5rem;
    }
    
    .attachment-item {
        min-width: 70px;
        max-width: 100px;
        padding: 0.4rem;
    }
    
    .attachment-thumbnail,
    .attachment-icon {
        width: 50px;
        height: 50px;
    }
    
    .attachment-icon {
        font-size: 20px;
    }
    
    .attachment-name {
        font-size: 0.7rem;
    }
    .modal-dialog {
        margin: 5px;
    }
    
    .modal-xl {
        max-width: 100%;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 0.75rem;
        max-height: calc(95vh - 100px);
    }
    .timeline-item.customer-message {
        padding-left: 10%;
    }
    
    .timeline-item.admin-message {
        padding-right: 10%;
    }
    
    .timeline-marker {
        width: 28px !important;
        height: 28px !important;
    }
    
    .timeline-marker i {
        font-size: 12px;
    }
    
    .timeline-content {
        padding: 0.6rem 0.8rem !important;
    }
    
    .message-content {
        font-size: 0.9rem;
    }
    .compact-faq .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
        white-space: normal;
        word-wrap: break-word;
        text-overflow: unset;
        overflow: visible;
    }
    
    .faq-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.6rem;
    }
    .product-card .col-1 {
        flex: 0 0 auto;
        width: 8.33333333%;
    }
    
    .product-card .col-3 {
        flex: 0 0 auto;
        width: 25%;
    }
    
    .product-card .col-8 {
        flex: 0 0 auto;
        width: 66.66666667%;
    }
    .responsive-orders-table, .responsive-orders-table thead, .responsive-orders-table tbody, .responsive-orders-table tr, .responsive-orders-table th, .responsive-orders-table td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .responsive-orders-table thead {
        display: none !important;
    }
    .responsive-orders-table tr {
        margin-bottom: 1.5rem;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.03);
        padding: 1rem 0.5rem;
    }
    .responsive-orders-table td {
        padding: 0.5rem 1rem;
        border: none;
        position: relative;
    }
    .responsive-orders-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        display: block;
        margin-bottom: 0.25rem;
        font-size: 0.95em;
    }
    .responsive-orders-table td:last-child {
        padding-bottom: 1rem;
    }

    .welcome-header-compact {
        min-height: auto;
    }
    .search-section-compact {
        padding: 8px;
    }
    #solution-content {
        padding: 10px;
    }
    .help-navigation-section .card-body, .quick-actions-section .card-body, .orders-section .card-body, .tickets-section .card-body{
        padding: 10px 8px;
    }
    #contact-form {
        padding: 10px;
    }
    label.form-check-label.w-100.d-flex.align-items-center {
        flex-direction: column;
        align-items: flex-start !important;
    }
    .help-navigation-section span.badge.bg-success.ms-2 {
        margin-top: 10px;
    }

}