/* Log Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    /* Modern blur effect */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* High z-index */
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Modal Content Box */
.log-modal-content {
    background: #1e1e1e;
    border: 1px solid #444;
    border-radius: 12px;
    width: 700px;
    /* Slightly wider */
    max-width: 95vw;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    /* Contains children */
}

/* Modal Header */
.log-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #252525;
    border-bottom: 1px solid #333;
}

.log-modal-header h3 {
    margin: 0;
    color: #e0e0e0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Log Console Area */
.log-console {
    background: #0d0d0d;
    /* Darker black */
    color: #f0f0f0;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    /* Modern font stack */
    padding: 15px 20px;
    margin: 0;
    /* Removing margin */
    flex-grow: 1;
    /* Fills available space */
    height: 400px;
    /* Taller default height */
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    text-align: left;
    /* Explicitly fix left alignment */
}

/* Custom Scrollbar for Console */
.log-console::-webkit-scrollbar {
    width: 8px;
}

.log-console::-webkit-scrollbar-track {
    background: #0d0d0d;
}

.log-console::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.log-console::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Log Entries */
.log-entry {
    margin-bottom: 4px;
    padding: 2px 0;
    display: flex;
    align-items: flex-start;
    /* Correct alignment for multiline logs */
}

.log-timestamp {
    color: #666;
    margin-right: 12px;
    font-size: 11px;
    min-width: 60px;
    /* Fixed width for alignment */
    user-select: none;
    /* Prevent selection when copying logs */
}

/* Log Colors */
.log-entry.info {
    color: #cccccc;
}

.log-entry.error {
    color: #ff6b6b;
    font-weight: bold;
}

.log-entry.success {
    color: #51cf66;
    font-weight: bold;
}

.log-entry.req {
    color: #74c0fc;
}

/* Light Blue */
.log-entry.res {
    color: #da77f2;
}

/* Lavender */

/* Modal Footer / Actions */
.modal-actions {
    padding: 12px 20px;
    background: #252525;
    border-top: 1px solid #333;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Action Buttons */
.btn-log-action {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-weight: 500;
}

.btn-cancel {
    background: #333;
    color: #aaa;
}

.btn-cancel:hover {
    background: #444;
    color: #fff;
}

.btn-copy {
    background: #228be6;
    /* Blue */
    color: white;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-copy:hover {
    background: #1c7ed6;
    transform: translateY(-1px);
}

.btn-copy:active {
    transform: translateY(0);
}