/* Quick Preview Button */
.quick-preview-btn {
    float: right;
    margin-left: 8px;
    margin-right: 8px;
    padding: 0;
    cursor: pointer;
    color: #6c757d;
    opacity: 0.7;
    transition: opacity 0.2s ease, color 0.2s ease;
    font-size: 14px;
    line-height: 1.7rem;
}

.quick-preview-btn:hover {
    opacity: 1;
    color: #007bff;
}

/* Quick Preview Modal */
#quickPreviewModal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.quick-preview-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
}

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

.quick-preview-header {
    padding: 16px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-preview-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    flex: 1;
    padding-right: 20px;
}

.quick-preview-close {
    color: #6c757d;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.quick-preview-close:hover,
.quick-preview-close:focus {
    color: #000;
    background-color: #e9ecef;
}

.quick-preview-body {
    padding: 20px;
    max-height: calc(80vh - 180px);
    overflow-y: auto;
}

.quick-preview-meta {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    color: #6c757d;
}

.quick-preview-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.quick-preview-message {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
}

.quick-preview-message img {
    max-width: 100%;
    height: auto;
}

.quick-preview-footer {
    padding: 12px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.quick-preview-footer a {
    display: inline-block;
    padding: 8px 20px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.quick-preview-footer a:hover {
    background-color: #0056b3;
}

/* Loading State */
.quick-preview-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.quick-preview-loading::after {
    content: '...';
    display: inline-block;
    width: 20px;
    animation: dots 1.5s steps(3, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Error State */
.quick-preview-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

/* Tooltip */
.quick-preview-tooltip {
    position: absolute;
    z-index: 10000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 7px 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 12px;
    white-space: nowrap;
}

.quick-preview-tooltip.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    cursor: pointer;
}

.quick-preview-tooltip-arrow {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #667eea;
}

.quick-preview-tooltip-text {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Responsive */
@media (max-width: 768px) {
    .quick-preview-content {
        width: 95%;
        margin: 10px auto;
        max-height: 90vh;
    }

    .quick-preview-header h3 {
        font-size: 16px;
    }

    .quick-preview-meta {
        flex-direction: column;
        gap: 8px;
    }

    .quick-preview-tooltip {
        font-size: 13px;
        padding: 8px 12px;
    }
}
