/* Floating Error Log Container */
.error-log-container {
    position: fixed;
    right: 0;
    top: 20%;
    width: auto;
    min-width: 320px;
    max-width: 480px;
    background: #ffffff;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    transform: translateX(calc(100% - 50px));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient Border Effect */
.error-log-container::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(270deg, #7f3fff -.37%, #ff1bbe 77.15%);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: xor;
    pointer-events: none;
}

/* Open State */
.error-log-container.open {
    transform: translateX(0);
}

/* Header Styling */
.error-log-header {
    background: #1e1e2d;
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-top-left-radius: 12px;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom-left-radius: 12px;
}

/* Error Count Badge */
.update-plugins.count-80 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2c0101;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 6px;
}

/* Toggle Button */
.error-log-toggle {
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-log-container.open .error-log-toggle {
    transform: rotate(180deg);
}

/* Content Area */
.error-log-content {
    background: #f8fafc;
    max-height: 360px;
    overflow-y: auto;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
    padding: 15px;
}

.error-log-content::-webkit-scrollbar {
    width: 6px;
}

.error-log-content::-webkit-scrollbar-track {
    background: transparent;
}

.error-log-content::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.error-log-container.open .error-log-content {
    display: block;
    border-bottom-left-radius: 12px;
}

/* Individual Error Messages */
.debug-log-errors {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-family: 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #dc2626;
    background: #fff;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.debug-log-errors:last-child {
    border-bottom: none;
}

/* Hover Effect on Error Messages */
.debug-log-errors:hover {
    background: #fef2f2;
}

/* Timestamp Styling */
.debug-log-errors time {
    color: #64748b;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 4px;
}

/* Error Type Highlighting */
.debug-log-errors strong {
    color: #991b1b;
    font-weight: 600;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .error-log-container {
        min-width: 280px;
        max-width: 100%;
        top: auto;
        bottom: 0;
        border-radius: 12px 12px 0 0;
        transform: translateY(calc(100% - 50px));
    }

    .error-log-container::before {
        border-radius: 12px 12px 0 0;
    }

    .error-log-container.open {
        transform: translateY(0);
    }

    .error-log-header {
        border-radius: 12px 12px 0 0;
    }
}

/* Animation for New Errors */
@keyframes errorHighlight {
    0% {
        background: #fef2f2;
    }

    100% {
        background: #ffffff;
    }
}

.debug-log-errors.new {
    animation: errorHighlight 2s ease-out;
}