/**
 * Support & Updates page styles
 * @package report_adeptus_insights
 */

/* Support container */
.support-container {
    min-height: 100vh;
    padding: 0;
}

/* Page Header Banner - Consistent with Wizard/Generated Reports */
.page-header-banner {
    background: linear-gradient(135deg, #0f6cbf 0%, #3a8dd4 100%);
    color: white;
    padding: 30px;
    border-radius: 0.75rem;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.page-header-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 100%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.page-header-content {
    z-index: 1;
}

.page-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-header-icon {
    font-size: 1.5rem;
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.page-header-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 10px 0 0 0;
}

.page-header-actions {
    display: flex;
    gap: 10px;
    z-index: 1;
}

.page-header-actions .btn-light {
    background: white;
    color: #0f6cbf;
    border: none;
    font-weight: 500;
}

.page-header-actions .btn-light:hover {
    background: #f8f9fa;
    color: #0a5299;
}

.page-header-actions .btn-outline-light {
    border: 2px solid rgba(255,255,255,0.8);
    color: white;
    font-weight: 500;
}

.page-header-actions .btn-outline-light:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
}

/* Badge styles for Bootstrap 4 compatibility */
.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-info {
    background-color: #17a2b8;
    color: #fff;
}

.badge-success {
    background-color: #28a745;
    color: #fff;
}

.badge-danger {
    background-color: #dc3545;
    color: #fff;
}

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

.badge-primary {
    background-color: #007bff;
    color: #fff;
}

/* Ticket list styling */
.table td {
    vertical-align: middle;
}

.table code {
    font-size: 0.875rem;
    color: #6c757d;
    background-color: #f8f9fa;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

/* Reply styling */
.reply-item {
    transition: all 0.2s ease;
}

.reply-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bg-info-light {
    background-color: rgba(23, 162, 184, 0.08);
}

.border-left-info {
    border-left: 4px solid #17a2b8;
}

.border-left-secondary {
    border-left: 4px solid #6c757d;
}

/* Changelog styling */
.changelog-item {
    transition: all 0.2s ease;
}

.changelog-item:hover {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: -1rem;
    margin-bottom: 1.5rem;
}

.changelog-content {
    color: #495057;
}

.changelog-content ul {
    list-style-type: none;
    padding-left: 0;
}

.changelog-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.changelog-content li:before {
    content: "•";
    color: #007bff;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Filter styling */
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
}

/* Tab styling */
.nav-tabs .nav-link {
    color: #495057;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
}

.nav-tabs .nav-link.active {
    color: #007bff;
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

.nav-tabs .nav-link i {
    margin-right: 0.5rem;
}

/* Card enhancements */
.card {
    border: none;
    border-radius: 8px;
}

.card-header {
    border-radius: 8px 8px 0 0 !important;
    padding: 1rem 1.25rem;
}

.card-header h5,
.card-header h6 {
    font-weight: 600;
}

/* Message content */
.message-content {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #212529;
}

.ticket-message {
    border-left: 4px solid #007bff;
}

/* Form styling */
.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

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

/* Alert styling */
.alert {
    border-radius: 8px;
    border: none;
}

.alert-info {
    background-color: #e8f4f8;
    color: #0c5460;
}

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

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

.alert-danger,
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Empty state styling */
.text-center.py-5 i.fa-4x {
    color: #dee2e6;
}

/* Update status card */
.bg-warning {
    background-color: #ffc107 !important;
}

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

.text-warning {
    color: #856404 !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .page-header-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .page-header-actions {
        flex-direction: column;
        width: 100%;
    }

    .page-header-actions .btn {
        width: 100%;
    }

    .page-header-title {
        justify-content: center;
    }

    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
    }

    .d-flex.justify-content-between .btn {
        width: 100%;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Print styling */
@media print {
    .page-header-banner,
    .nav-tabs,
    .btn,
    form {
        display: none !important;
    }

    .card {
        box-shadow: none !important;
    }
}

/* ============================================
   Modern Drag & Drop File Upload
   ============================================ */

.file-upload-container {
    margin-bottom: 1rem;
}

/* Dropzone */
.file-dropzone {
    position: relative;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.file-dropzone:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.file-dropzone.dragover {
    border-color: #007bff;
    border-style: solid;
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    transform: scale(1.01);
}

.file-dropzone.max-files {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.file-dropzone.has-files {
    padding: 1.5rem;
}

/* Hidden file input */
.file-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

/* Dropzone content */
.dropzone-content {
    position: relative;
    z-index: 1;
}

.dropzone-icon {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.file-dropzone:hover .dropzone-icon {
    color: #007bff;
    transform: translateY(-5px);
}

.file-dropzone.dragover .dropzone-icon {
    color: #007bff;
    transform: scale(1.1);
    animation: bounce 0.5s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0) scale(1.1); }
    50% { transform: translateY(-10px) scale(1.1); }
}

.dropzone-text {
    margin-bottom: 1rem;
}

.dropzone-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.25rem 0;
}

.dropzone-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

.dropzone-browse {
    color: #007bff;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.dropzone-browse:hover {
    color: #0056b3;
}

/* File type indicators */
.dropzone-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dropzone-info span {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
    background: white;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dropzone-info span i {
    color: #007bff;
}

/* Drag overlay */
.dropzone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 10px;
}

.dropzone-overlay i {
    font-size: 3rem;
    color: white;
    animation: pulse 1s ease infinite;
}

.dropzone-overlay span {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.file-dropzone.dragover .dropzone-overlay {
    opacity: 1;
    visibility: visible;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* File Preview List */
.file-preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.file-preview-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.file-preview-item.removing {
    opacity: 0;
    transform: translateX(20px);
}

.file-preview-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.15);
}

/* File Thumbnail */
.file-thumbnail {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.file-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-thumbnail.file-icon {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.file-thumbnail.file-icon i {
    font-size: 1.25rem;
    color: #007bff;
}

.file-thumbnail.loading {
    background: #f3f4f6;
}

.file-thumbnail.loading i {
    font-size: 1rem;
    color: #9ca3af;
}

/* File Info */
.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.file-size {
    font-size: 0.75rem;
    color: #6b7280;
}

.file-ext {
    font-size: 0.625rem;
    font-weight: 600;
    color: #007bff;
    background: #eff6ff;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Remove Button */
.file-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.file-remove:hover {
    background: #dc2626;
    color: white;
    transform: scale(1.1);
}

.file-remove:active {
    transform: scale(0.95);
}

/* Upload Info */
.upload-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.upload-info-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.upload-info-item i {
    font-size: 0.875rem;
}

/* Toast Notification */
.upload-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #dc2626;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.upload-toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.upload-toast i {
    font-size: 1rem;
}

/* Mobile responsive */
@media (max-width: 576px) {
    .file-dropzone {
        padding: 1.5rem 1rem;
    }

    .dropzone-icon {
        font-size: 2.5rem;
    }

    .dropzone-title {
        font-size: 1rem;
    }

    .dropzone-info {
        gap: 0.5rem;
    }

    .dropzone-info span {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }

    .file-thumbnail {
        width: 40px;
        height: 40px;
    }

    .file-name {
        font-size: 0.8125rem;
    }

    .upload-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}
